diff options
-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 |