lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1210096264-27426-2-git-send-email-crquan@gmail.com>
Date:	Wed,  7 May 2008 01:51:04 +0800
From:	Denis Cheng <crquan@...il.com>
To:	Al Viro <viro@...iv.linux.org.uk>,
	Steven Whitehouse <swhiteho@...hat.com>
Cc:	linux-fsdevel@...r.kernel.org, cluster-devel@...hat.com,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] [GFS2] remove the duplicates of just_schedule

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

Signed-off-by: Denis Cheng <crquan@...il.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ