diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-09-23 08:33:42 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-09-25 12:08:25 -0400 |
commit | ae1b7f7d4b9ea587fda95c38301f4e72e8146634 (patch) | |
tree | 7b6861974a64c2251f3f8abd7f4edc4f7434a02c /fs/fs-writeback.c | |
parent | 7fbdea32328312c65870c397a0a436c3226c8631 (diff) |
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.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 551684de1392..916e83489caa 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) | |||
449 | spin_lock(&inode_lock); | 449 | spin_lock(&inode_lock); |
450 | inode->i_state &= ~I_SYNC; | 450 | inode->i_state &= ~I_SYNC; |
451 | if (!(inode->i_state & (I_FREEING | I_CLEAR))) { | 451 | if (!(inode->i_state & (I_FREEING | I_CLEAR))) { |
452 | if (!(inode->i_state & I_DIRTY) && | 452 | if (inode->i_state & I_DIRTY) { |
453 | mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { | 453 | /* |
454 | * Someone redirtied the inode while were writing back | ||
455 | * the pages. | ||
456 | */ | ||
457 | redirty_tail(inode); | ||
458 | } else if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { | ||
454 | /* | 459 | /* |
455 | * We didn't write back all the pages. nfs_writepages() | 460 | * We didn't write back all the pages. nfs_writepages() |
456 | * sometimes bales out without doing anything. Redirty | 461 | * sometimes bales out without doing anything. Redirty |
@@ -494,12 +499,6 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc) | |||
494 | inode->i_state |= I_DIRTY_PAGES; | 499 | inode->i_state |= I_DIRTY_PAGES; |
495 | redirty_tail(inode); | 500 | redirty_tail(inode); |
496 | } | 501 | } |
497 | } else if (inode->i_state & I_DIRTY) { | ||
498 | /* | ||
499 | * Someone redirtied the inode while were writing back | ||
500 | * the pages. | ||
501 | */ | ||
502 | redirty_tail(inode); | ||
503 | } else if (atomic_read(&inode->i_count)) { | 502 | } else if (atomic_read(&inode->i_count)) { |
504 | /* | 503 | /* |
505 | * The inode is clean, inuse | 504 | * The inode is clean, inuse |