linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Cheng <crquan@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>,
	Steven Whitehouse <swhiteho@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] [GFS2] remove the duplicates of just_schedule
Date: Wed,  7 May 2008 01:51:04 +0800	[thread overview]
Message-ID: <1210096264-27426-2-git-send-email-crquan@gmail.com> (raw)
In-Reply-To: <1210096264-27426-1-git-send-email-crquan@gmail.com>

Accroding to the former patch, just_schedule is available from fs/inode.c

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 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 <linux/freezer.h>
 #include <linux/workqueue.h>
 #include <linux/jiffies.h>
+#include <linux/writeback.h>
 
 #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 <linux/kobject.h>
 #include <linux/fcntl.h>
 #include <linux/wait.h>
+#include <linux/writeback.h>
 #include <net/sock.h>
 
 #include <linux/dlm.h>
-- 
1.5.5.1


  reply	other threads:[~2008-05-06 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-06 17:51 [PATCH 1/2] [fs-devel] the real needs of just_schedule Denis Cheng
2008-05-06 17:51 ` Denis Cheng [this message]
2008-05-08 13:11 ` Steven Whitehouse
2008-05-08 18:30   ` rae l

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1210096264-27426-2-git-send-email-crquan@gmail.com \
    --to=crquan@gmail.com \
    --cc=cluster-devel@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swhiteho@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).