aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r--fs/fs-writeback.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index dd41437b7a1f..65cd14769226 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -373,21 +373,8 @@ writeback_single_inode(struct inode *inode, struct bdi_writeback *wb,
373 WARN_ON(inode->i_state & I_WILL_FREE); 373 WARN_ON(inode->i_state & I_WILL_FREE);
374 374
375 if (inode->i_state & I_SYNC) { 375 if (inode->i_state & I_SYNC) {
376 /* 376 if (wbc->sync_mode != WB_SYNC_ALL)
377 * If this inode is locked for writeback and we are not doing
378 * writeback-for-data-integrity, move it to b_more_io so that
379 * writeback can proceed with the other inodes on s_io.
380 *
381 * We'll have another go at writing back this inode when we
382 * completed a full scan of b_io.
383 */
384 if (wbc->sync_mode != WB_SYNC_ALL) {
385 requeue_io(inode, wb);
386 trace_writeback_single_inode_requeue(inode, wbc,
387 nr_to_write);
388 return 0; 377 return 0;
389 }
390
391 /* 378 /*
392 * It's a data-integrity sync. We must wait. 379 * It's a data-integrity sync. We must wait.
393 */ 380 */
@@ -576,6 +563,21 @@ static long writeback_sb_inodes(struct super_block *sb,
576 redirty_tail(inode, wb); 563 redirty_tail(inode, wb);
577 continue; 564 continue;
578 } 565 }
566 if ((inode->i_state & I_SYNC) && wbc.sync_mode != WB_SYNC_ALL) {
567 /*
568 * If this inode is locked for writeback and we are not
569 * doing writeback-for-data-integrity, move it to
570 * b_more_io so that writeback can proceed with the
571 * other inodes on s_io.
572 *
573 * We'll have another go at writing back this inode
574 * when we completed a full scan of b_io.
575 */
576 spin_unlock(&inode->i_lock);
577 requeue_io(inode, wb);
578 trace_writeback_sb_inodes_requeue(inode);
579 continue;
580 }
579 __iget(inode); 581 __iget(inode);
580 write_chunk = writeback_chunk_size(wb->bdi, work); 582 write_chunk = writeback_chunk_size(wb->bdi, work);
581 wbc.nr_to_write = write_chunk; 583 wbc.nr_to_write = write_chunk;