aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 3ba237b0b2a..2d6c6c8c036 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1551,10 +1551,10 @@ static int do_journal_get_write_access(handle_t *handle,
1551 if (!buffer_mapped(bh) || buffer_freed(bh)) 1551 if (!buffer_mapped(bh) || buffer_freed(bh))
1552 return 0; 1552 return 0;
1553 /* 1553 /*
1554 * __block_prepare_write() could have dirtied some buffers. Clean 1554 * __block_write_begin() could have dirtied some buffers. Clean
1555 * the dirty bit as jbd2_journal_get_write_access() could complain 1555 * the dirty bit as jbd2_journal_get_write_access() could complain
1556 * otherwise about fs integrity issues. Setting of the dirty bit 1556 * otherwise about fs integrity issues. Setting of the dirty bit
1557 * by __block_prepare_write() isn't a real problem here as we clear 1557 * by __block_write_begin() isn't a real problem here as we clear
1558 * the bit before releasing a page lock and thus writeback cannot 1558 * the bit before releasing a page lock and thus writeback cannot
1559 * ever write the buffer. 1559 * ever write the buffer.
1560 */ 1560 */
@@ -2065,11 +2065,11 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd,
2065 /* 2065 /*
2066 * If the page does not have buffers (for 2066 * If the page does not have buffers (for
2067 * whatever reason), try to create them using 2067 * whatever reason), try to create them using
2068 * block_prepare_write. If this fails, 2068 * __block_write_begin. If this fails,
2069 * redirty the page and move on. 2069 * redirty the page and move on.
2070 */ 2070 */
2071 if (!page_has_buffers(page)) { 2071 if (!page_has_buffers(page)) {
2072 if (block_prepare_write(page, 0, len, 2072 if (__block_write_begin(page, 0, len,
2073 noalloc_get_block_write)) { 2073 noalloc_get_block_write)) {
2074 redirty_page: 2074 redirty_page:
2075 redirty_page_for_writepage(mpd->wbc, 2075 redirty_page_for_writepage(mpd->wbc,
@@ -2550,8 +2550,7 @@ static int ext4_da_get_block_prep(struct inode *inode, sector_t iblock,
2550 if (buffer_delay(bh)) 2550 if (buffer_delay(bh))
2551 return 0; /* Not sure this could or should happen */ 2551 return 0; /* Not sure this could or should happen */
2552 /* 2552 /*
2553 * XXX: __block_prepare_write() unmaps passed block, 2553 * XXX: __block_write_begin() unmaps passed block, is it OK?
2554 * is it OK?
2555 */ 2554 */
2556 ret = ext4_da_reserve_space(inode, iblock); 2555 ret = ext4_da_reserve_space(inode, iblock);
2557 if (ret) 2556 if (ret)
@@ -2583,7 +2582,7 @@ static int ext4_da_get_block_prep(struct inode *inode, sector_t iblock,
2583/* 2582/*
2584 * This function is used as a standard get_block_t calback function 2583 * This function is used as a standard get_block_t calback function
2585 * when there is no desire to allocate any blocks. It is used as a 2584 * when there is no desire to allocate any blocks. It is used as a
2586 * callback function for block_prepare_write() and block_write_full_page(). 2585 * callback function for block_write_begin() and block_write_full_page().
2587 * These functions should only try to map a single block at a time. 2586 * These functions should only try to map a single block at a time.
2588 * 2587 *
2589 * Since this function doesn't do block allocations even if the caller 2588 * Since this function doesn't do block allocations even if the caller
@@ -2716,11 +2715,11 @@ static int ext4_writepage(struct page *page,
2716 2715
2717 /* 2716 /*
2718 * If the page does not have buffers (for whatever reason), 2717 * If the page does not have buffers (for whatever reason),
2719 * try to create them using block_prepare_write. If this 2718 * try to create them using __block_write_begin. If this
2720 * fails, redirty the page and move on. 2719 * fails, redirty the page and move on.
2721 */ 2720 */
2722 if (!page_buffers(page)) { 2721 if (!page_buffers(page)) {
2723 if (block_prepare_write(page, 0, len, 2722 if (__block_write_begin(page, 0, len,
2724 noalloc_get_block_write)) { 2723 noalloc_get_block_write)) {
2725 redirty_page: 2724 redirty_page:
2726 redirty_page_for_writepage(wbc, page); 2725 redirty_page_for_writepage(wbc, page);