linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] [fs-devel] the real needs of just_schedule
@ 2008-05-06 17:51 Denis Cheng
  2008-05-06 17:51 ` [PATCH 2/2] [GFS2] remove the duplicates " Denis Cheng
  2008-05-08 13:11 ` [PATCH 1/2] [fs-devel] the real needs " Steven Whitehouse
  0 siblings, 2 replies; 4+ messages in thread
From: Denis Cheng @ 2008-05-06 17:51 UTC (permalink / raw)
  To: Al Viro, Steven Whitehouse; +Cc: linux-fsdevel, cluster-devel, linux-kernel

there are some situations which really need a just schedule,
with int return value;
and this should be moved into lib/ in the future.

Signed-off-by: Denis Cheng <crquan@gmail.com>
---
 fs/inode.c                |    2 +-
 include/linux/writeback.h |   16 ++++++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/fs/inode.c b/fs/inode.c
index bf64781..b355a44 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1291,7 +1291,7 @@ int inode_needs_sync(struct inode *inode)
 
 EXPORT_SYMBOL(inode_needs_sync);
 
-int inode_wait(void *word)
+int just_schedule(void *word)
 {
 	schedule();
 	return 0;
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index f462439..80ff5eb 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -67,23 +67,31 @@ struct writeback_control {
 
 /*
  * fs/fs-writeback.c
- */	
+ */
 void writeback_inodes(struct writeback_control *wbc);
-int inode_wait(void *);
 void sync_inodes_sb(struct super_block *, int wait);
 void sync_inodes(int wait);
 
+/*
+ * fs/inode.c
+ *
+ * there are some situations which really need a just schedule,
+ * with int return value;
+ * and this should be moved into lib/ in the future.
+ */
+int just_schedule(void *);
+
 /* writeback.h requires fs.h; it, too, is not included from here. */
 static inline void wait_on_inode(struct inode *inode)
 {
 	might_sleep();
-	wait_on_bit(&inode->i_state, __I_LOCK, inode_wait,
+	wait_on_bit(&inode->i_state, __I_LOCK, just_schedule,
 							TASK_UNINTERRUPTIBLE);
 }
 static inline void inode_sync_wait(struct inode *inode)
 {
 	might_sleep();
-	wait_on_bit(&inode->i_state, __I_SYNC, inode_wait,
+	wait_on_bit(&inode->i_state, __I_SYNC, just_schedule,
 							TASK_UNINTERRUPTIBLE);
 }
 
-- 
1.5.5.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-08 18:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-06 17:51 [PATCH 1/2] [fs-devel] the real needs of just_schedule Denis Cheng
2008-05-06 17:51 ` [PATCH 2/2] [GFS2] remove the duplicates " Denis Cheng
2008-05-08 13:11 ` [PATCH 1/2] [fs-devel] the real needs " Steven Whitehouse
2008-05-08 18:30   ` rae l

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).