diff --git a/fs/buffer.c b/fs/buffer.c index a550e0d8e965eadda7a2222aea38daf8a539984a..057e7187e416cddb1d78be99da5f6254e66fd332 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2085,7 +2085,7 @@ int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, } EXPORT_SYMBOL(block_write_begin); -int __generic_write_end(struct inode *inode, loff_t pos, unsigned copied, +void __generic_write_end(struct inode *inode, loff_t pos, unsigned copied, struct page *page) { loff_t old_size = inode->i_size; @@ -2116,7 +2116,6 @@ int __generic_write_end(struct inode *inode, loff_t pos, unsigned copied, */ if (i_size_changed) mark_inode_dirty(inode); - return copied; } int block_write_end(struct file *file, struct address_space *mapping, @@ -2160,7 +2159,8 @@ int generic_write_end(struct file *file, struct address_space *mapping, struct page *page, void *fsdata) { copied = block_write_end(file, mapping, pos, len, copied, page, fsdata); - return __generic_write_end(mapping->host, pos, copied, page); + __generic_write_end(mapping->host, pos, copied, page); + return copied; } EXPORT_SYMBOL(generic_write_end); diff --git a/fs/internal.h b/fs/internal.h index d109665b9e50f4e525d0d82a3074127ffe1a556c..b2705b6dccdb6197e54483ca4a42cef34b4da643 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -43,7 +43,7 @@ static inline int __sync_blockdev(struct block_device *bdev, int wait) extern void guard_bio_eod(int rw, struct bio *bio); extern int __block_write_begin_int(struct page *page, loff_t pos, unsigned len, get_block_t *get_block, struct iomap *iomap); -int __generic_write_end(struct inode *inode, loff_t pos, unsigned copied, +void __generic_write_end(struct inode *inode, loff_t pos, unsigned copied, struct page *page); /* diff --git a/fs/iomap.c b/fs/iomap.c index 03edf62633dcc4d0a6160b8a0f0874dc831374fd..f08271c77ea41b0141d6ca30222af1ede64c3e97 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -744,7 +744,8 @@ __iomap_write_end(struct inode *inode, loff_t pos, unsigned len, iomap_set_range_uptodate(page, offset_in_page(pos), len); iomap_set_page_dirty(page); } - return __generic_write_end(inode, pos, copied, page); + __generic_write_end(inode, pos, copied, page); + return copied; } static int