diff options
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index c6bf775e641a..52aa54540079 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -474,10 +474,15 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc) | |||
474 | spin_lock(&inode_lock); | 474 | spin_lock(&inode_lock); |
475 | inode->i_state &= ~I_SYNC; | 475 | inode->i_state &= ~I_SYNC; |
476 | if (!(inode->i_state & (I_FREEING | I_CLEAR))) { | 476 | if (!(inode->i_state & (I_FREEING | I_CLEAR))) { |
477 | if (inode->i_state & I_DIRTY) { | 477 | if ((inode->i_state & I_DIRTY_PAGES) && wbc->for_kupdate) { |
478 | /* | 478 | /* |
479 | * Someone redirtied the inode while were writing back | 479 | * More pages get dirtied by a fast dirtier. |
480 | * the pages. | 480 | */ |
481 | goto select_queue; | ||
482 | } else if (inode->i_state & I_DIRTY) { | ||
483 | /* | ||
484 | * At least XFS will redirty the inode during the | ||
485 | * writeback (delalloc) and on io completion (isize). | ||
481 | */ | 486 | */ |
482 | redirty_tail(inode); | 487 | redirty_tail(inode); |
483 | } else if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { | 488 | } else if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { |
@@ -502,6 +507,7 @@ writeback_single_inode(struct inode *inode, struct writeback_control *wbc) | |||
502 | * soon as the queue becomes uncongested. | 507 | * soon as the queue becomes uncongested. |
503 | */ | 508 | */ |
504 | inode->i_state |= I_DIRTY_PAGES; | 509 | inode->i_state |= I_DIRTY_PAGES; |
510 | select_queue: | ||
505 | if (wbc->nr_to_write <= 0) { | 511 | if (wbc->nr_to_write <= 0) { |
506 | /* | 512 | /* |
507 | * slice used up: queue for next turn | 513 | * slice used up: queue for next turn |