Revert "Third, make the page argument optional". --- fs/gfs2/aops.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index aa2031ff82c8..37410293c1f8 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -815,7 +815,7 @@ static void adjust_fs_space(struct inode *inode) * @dibh: The buffer_head containing the on-disk inode * @pos: The file position * @copied: How much was actually copied by the VFS - * @page: The (optional) page + * @page: The page * * This copies the data from the page into the inode block after * the inode data structure itself. @@ -830,29 +830,15 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh, u64 to = pos + copied; void *kaddr; unsigned char *buf = dibh->b_data + sizeof(struct gfs2_dinode); - bool page_grabbed = false; BUG_ON(pos + copied > gfs2_max_stuffed_size(ip)); - if (!page) { - page = find_lock_page(inode->i_mapping, 0); - if (WARN_ON(!page)) - return -ENOMEM; - page_grabbed = true; - } - kaddr = kmap_atomic(page); memcpy(buf + pos, kaddr + pos, copied); flush_dcache_page(page); kunmap_atomic(kaddr); WARN_ON(!PageUptodate(page)); - - if (page_grabbed) { - unlock_page(page); - put_page(page); - } - if (copied) { if (inode->i_size < to) i_size_write(inode, to); -- 2.14.3