From: Denis Cheng Date: Wed, 7 May 2008 01:51:04 +0800 Subject: [Cluster-devel] [PATCH 2/2] [GFS2] remove the duplicates of just_schedule In-Reply-To: <1210096264-27426-1-git-send-email-crquan@gmail.com> References: <1210096264-27426-1-git-send-email-crquan@gmail.com> Message-ID: <1210096264-27426-2-git-send-email-crquan@gmail.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Accroding to the former patch, just_schedule is available from fs/inode.c Signed-off-by: Denis Cheng --- fs/gfs2/glock.c | 7 +------ fs/gfs2/locking/dlm/lock.c | 9 ++------- fs/gfs2/locking/dlm/lock_dlm.h | 1 + 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index d636b3e..b39d827 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "gfs2.h" #include "incore.h" @@ -454,12 +455,6 @@ static void gfs2_holder_wake(struct gfs2_holder *gh) wake_up_bit(&gh->gh_iflags, HIF_WAIT); } -static int just_schedule(void *word) -{ - schedule(); - return 0; -} - static void wait_on_holder(struct gfs2_holder *gh) { might_sleep(); diff --git a/fs/gfs2/locking/dlm/lock.c b/fs/gfs2/locking/dlm/lock.c index cf7ea8a..2fb91a4 100644 --- a/fs/gfs2/locking/dlm/lock.c +++ b/fs/gfs2/locking/dlm/lock.c @@ -399,12 +399,6 @@ static void gdlm_del_lvb(struct gdlm_lock *lp) lp->lksb.sb_lvbptr = NULL; } -static int gdlm_ast_wait(void *word) -{ - schedule(); - return 0; -} - /* This can do a synchronous dlm request (requiring a lock_dlm thread to get the completion) because gfs won't call hold_lvb() during a callback (from the context of a lock_dlm thread). */ @@ -433,7 +427,8 @@ static int hold_null_lock(struct gdlm_lock *lp) set_bit(LFL_AST_WAIT, &lpn->flags); gdlm_do_lock(lpn); - wait_on_bit(&lpn->flags, LFL_AST_WAIT, gdlm_ast_wait, TASK_UNINTERRUPTIBLE); + wait_on_bit(&lpn->flags, LFL_AST_WAIT, just_schedule, + TASK_UNINTERRUPTIBLE); error = lpn->lksb.sb_status; if (error) { printk(KERN_INFO "lock_dlm: hold_null_lock dlm error %d\n", diff --git a/fs/gfs2/locking/dlm/lock_dlm.h b/fs/gfs2/locking/dlm/lock_dlm.h index a243cf6..407d00d 100644 --- a/fs/gfs2/locking/dlm/lock_dlm.h +++ b/fs/gfs2/locking/dlm/lock_dlm.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include -- 1.5.5.1