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 1/2] [fs-devel] the real needs of just_schedule
Date: Wed, 7 May 2008 01:51:03 +0800 [thread overview]
Message-ID: <1210096264-27426-1-git-send-email-crquan@gmail.com> (raw)
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
next 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 Denis Cheng [this message]
2008-05-06 17:51 ` [PATCH 2/2] [GFS2] remove the duplicates of just_schedule Denis Cheng
2008-05-08 13:11 ` [PATCH 1/2] [fs-devel] the real needs " 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-1-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).