1
0
Fork 0

fs: Turn __generic_write_end into a void function

The VFS-internal __generic_write_end helper always returns the value of
its @copied argument.  This can be confusing, and it isn't very useful
anyway, so turn __generic_write_end into a function returning void
instead.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
hifive-unleashed-5.2
Andreas Gruenbacher 2019-04-30 08:45:33 -07:00 committed by Darrick J. Wong
parent dbc582b6fb
commit 26ddb1f4fd
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -44,7 +44,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);
/*

View File

@ -769,7 +769,7 @@ iomap_write_end(struct inode *inode, loff_t pos, unsigned len,
ret = __iomap_write_end(inode, pos, len, copied, page, iomap);
}
ret = __generic_write_end(inode, pos, ret, page);
__generic_write_end(inode, pos, ret, page);
if (iomap->page_done)
iomap->page_done(inode, pos, copied, page, iomap);