summaryrefslogtreecommitdiff
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-09-23 20:33:42 +0800
committerJens Axboe <jens.axboe@oracle.com>2009-09-25 18:08:25 +0200
commitae1b7f7d4b9ea587fda95c38301f4e72e8146634 (patch)
tree7b6861974a64c2251f3f8abd7f4edc4f7434a02c /fs/fs-writeback.c
parent7fbdea32328312c65870c397a0a436c3226c8631 (diff)
downloadlinux-3.10-ae1b7f7d4b9ea587fda95c38301f4e72e8146634.tar.gz
linux-3.10-ae1b7f7d4b9ea587fda95c38301f4e72e8146634.tar.bz2
linux-3.10-ae1b7f7d4b9ea587fda95c38301f4e72e8146634.zip
writeback: cleanup writeback_single_inode()
Make the if-else straight in writeback_single_inode(). No behavior change. Cc: Jan Kara <jack@suse.cz> Cc: Michael Rubin <mrubin@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r--fs/fs-writeback.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 551684de139..916e83489ca 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -449,8 +449,13 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
spin_lock(&inode_lock);
inode->i_state &= ~I_SYNC;
if (!(inode->i_state & (I_FREEING | I_CLEAR))) {
- if (!(inode->i_state & I_DIRTY) &&
- mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
+ if (inode->i_state & I_DIRTY) {
+ /*
+ * Someone redirtied the inode while were writing back
+ * the pages.
+ */
+ redirty_tail(inode);
+ } else if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
/*
* We didn't write back all the pages. nfs_writepages()
* sometimes bales out without doing anything. Redirty
@@ -494,12 +499,6 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
inode->i_state |= I_DIRTY_PAGES;
redirty_tail(inode);
}
- } else if (inode->i_state & I_DIRTY) {
- /*
- * Someone redirtied the inode while were writing back
- * the pages.
- */
- redirty_tail(inode);
} else if (atomic_read(&inode->i_count)) {
/*
* The inode is clean, inuse