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 c2fa1be4923d..5d55a896ff78 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -1595,6 +1595,7 @@ static int __block_write_full_page(struct inode *inode, struct page *page, | |||
1595 | struct buffer_head *bh, *head; | 1595 | struct buffer_head *bh, *head; |
1596 | const unsigned blocksize = 1 << inode->i_blkbits; | 1596 | const unsigned blocksize = 1 << inode->i_blkbits; |
1597 | int nr_underway = 0; | 1597 | int nr_underway = 0; |
1598 | int write_op = (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : WRITE); | ||
1598 | 1599 | ||
1599 | BUG_ON(!PageLocked(page)); | 1600 | BUG_ON(!PageLocked(page)); |
1600 | 1601 | ||
@@ -1686,7 +1687,7 @@ static int __block_write_full_page(struct inode *inode, struct page *page, | |||
1686 | do { | 1687 | do { |
1687 | struct buffer_head *next = bh->b_this_page; | 1688 | struct buffer_head *next = bh->b_this_page; |
1688 | if (buffer_async_write(bh)) { | 1689 | if (buffer_async_write(bh)) { |
1689 | submit_bh(WRITE, bh); | 1690 | submit_bh(write_op, bh); |
1690 | nr_underway++; | 1691 | nr_underway++; |
1691 | } | 1692 | } |
1692 | bh = next; | 1693 | bh = next; |
@@ -1740,7 +1741,7 @@ recover: | |||
1740 | struct buffer_head *next = bh->b_this_page; | 1741 | struct buffer_head *next = bh->b_this_page; |
1741 | if (buffer_async_write(bh)) { | 1742 | if (buffer_async_write(bh)) { |
1742 | clear_buffer_dirty(bh); | 1743 | clear_buffer_dirty(bh); |
1743 | submit_bh(WRITE, bh); | 1744 | submit_bh(write_op, bh); |
1744 | nr_underway++; | 1745 | nr_underway++; |
1745 | } | 1746 | } |
1746 | bh = next; | 1747 | bh = next; |