diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 891e1c78e4f1..e7ebd95e0c68 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -1714,6 +1714,7 @@ static int __block_write_full_page(struct inode *inode, struct page *page, | |||
1714 | struct buffer_head *bh, *head; | 1714 | struct buffer_head *bh, *head; |
1715 | const unsigned blocksize = 1 << inode->i_blkbits; | 1715 | const unsigned blocksize = 1 << inode->i_blkbits; |
1716 | int nr_underway = 0; | 1716 | int nr_underway = 0; |
1717 | int write_op = (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE); | ||
1717 | 1718 | ||
1718 | BUG_ON(!PageLocked(page)); | 1719 | BUG_ON(!PageLocked(page)); |
1719 | 1720 | ||
@@ -1805,7 +1806,7 @@ static int __block_write_full_page(struct inode *inode, struct page *page, | |||
1805 | do { | 1806 | do { |
1806 | struct buffer_head *next = bh->b_this_page; | 1807 | struct buffer_head *next = bh->b_this_page; |
1807 | if (buffer_async_write(bh)) { | 1808 | if (buffer_async_write(bh)) { |
1808 | submit_bh(WRITE, bh); | 1809 | submit_bh(write_op, bh); |
1809 | nr_underway++; | 1810 | nr_underway++; |
1810 | } | 1811 | } |
1811 | bh = next; | 1812 | bh = next; |
@@ -1859,7 +1860,7 @@ recover: | |||
1859 | struct buffer_head *next = bh->b_this_page; | 1860 | struct buffer_head *next = bh->b_this_page; |
1860 | if (buffer_async_write(bh)) { | 1861 | if (buffer_async_write(bh)) { |
1861 | clear_buffer_dirty(bh); | 1862 | clear_buffer_dirty(bh); |
1862 | submit_bh(WRITE, bh); | 1863 | submit_bh(write_op, bh); |
1863 | nr_underway++; | 1864 | nr_underway++; |
1864 | } | 1865 | } |
1865 | bh = next; | 1866 | bh = next; |