diff options
| -rw-r--r-- | fs/fs-writeback.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 24489126f8ca..d8ea7ed411b2 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
| @@ -1380,6 +1380,10 @@ static long writeback_chunk_size(struct bdi_writeback *wb, | |||
| 1380 | * Write a portion of b_io inodes which belong to @sb. | 1380 | * Write a portion of b_io inodes which belong to @sb. |
| 1381 | * | 1381 | * |
| 1382 | * Return the number of pages and/or inodes written. | 1382 | * Return the number of pages and/or inodes written. |
| 1383 | * | ||
| 1384 | * NOTE! This is called with wb->list_lock held, and will | ||
| 1385 | * unlock and relock that for each inode it ends up doing | ||
| 1386 | * IO for. | ||
| 1383 | */ | 1387 | */ |
| 1384 | static long writeback_sb_inodes(struct super_block *sb, | 1388 | static long writeback_sb_inodes(struct super_block *sb, |
| 1385 | struct bdi_writeback *wb, | 1389 | struct bdi_writeback *wb, |
| @@ -1398,9 +1402,7 @@ static long writeback_sb_inodes(struct super_block *sb, | |||
| 1398 | unsigned long start_time = jiffies; | 1402 | unsigned long start_time = jiffies; |
| 1399 | long write_chunk; | 1403 | long write_chunk; |
| 1400 | long wrote = 0; /* count both pages and inodes */ | 1404 | long wrote = 0; /* count both pages and inodes */ |
| 1401 | struct blk_plug plug; | ||
| 1402 | 1405 | ||
| 1403 | blk_start_plug(&plug); | ||
| 1404 | while (!list_empty(&wb->b_io)) { | 1406 | while (!list_empty(&wb->b_io)) { |
| 1405 | struct inode *inode = wb_inode(wb->b_io.prev); | 1407 | struct inode *inode = wb_inode(wb->b_io.prev); |
| 1406 | 1408 | ||
| @@ -1498,7 +1500,6 @@ static long writeback_sb_inodes(struct super_block *sb, | |||
| 1498 | break; | 1500 | break; |
| 1499 | } | 1501 | } |
| 1500 | } | 1502 | } |
| 1501 | blk_finish_plug(&plug); | ||
| 1502 | return wrote; | 1503 | return wrote; |
| 1503 | } | 1504 | } |
| 1504 | 1505 | ||
