mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
fs: convert block_commit_write to return void
block_commit_write() always returns 0, this patch changes it to return void. Link: https://lkml.kernel.org/r/20230626055518.842392-3-beanhuo@iokpp.de Signed-off-by: Bean Huo <beanhuo@micron.com> Reviewed-by: Jan Kara <jack@suse.cz> Acked-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andreas Dilger <adilger.kernel@dilger.ca> Cc: Christian Brauner <brauner@kernel.org> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Luís Henriques <ocfs2-devel@oss.oracle.com> Cc: Mark Fasheh <mark@fasheh.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
489b7e72a6
commit
a524fcfe19
5 changed files with 13 additions and 23 deletions
14
fs/buffer.c
14
fs/buffer.c
|
@ -2180,7 +2180,7 @@ int __block_write_begin(struct page *page, loff_t pos, unsigned len,
|
|||
}
|
||||
EXPORT_SYMBOL(__block_write_begin);
|
||||
|
||||
static int __block_commit_write(struct folio *folio, size_t from, size_t to)
|
||||
static void __block_commit_write(struct folio *folio, size_t from, size_t to)
|
||||
{
|
||||
size_t block_start, block_end;
|
||||
bool partial = false;
|
||||
|
@ -2215,7 +2215,6 @@ static int __block_commit_write(struct folio *folio, size_t from, size_t to)
|
|||
*/
|
||||
if (!partial)
|
||||
folio_mark_uptodate(folio);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2596,11 +2595,10 @@ int cont_write_begin(struct file *file, struct address_space *mapping,
|
|||
}
|
||||
EXPORT_SYMBOL(cont_write_begin);
|
||||
|
||||
int block_commit_write(struct page *page, unsigned from, unsigned to)
|
||||
void block_commit_write(struct page *page, unsigned from, unsigned to)
|
||||
{
|
||||
struct folio *folio = page_folio(page);
|
||||
__block_commit_write(folio, from, to);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(block_commit_write);
|
||||
|
||||
|
@ -2646,11 +2644,11 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
|
|||
end = size - folio_pos(folio);
|
||||
|
||||
ret = __block_write_begin_int(folio, 0, end, get_block, NULL);
|
||||
if (!ret)
|
||||
ret = __block_commit_write(folio, 0, end);
|
||||
|
||||
if (unlikely(ret < 0))
|
||||
if (unlikely(ret))
|
||||
goto out_unlock;
|
||||
|
||||
__block_commit_write(folio, 0, end);
|
||||
|
||||
folio_mark_dirty(folio);
|
||||
folio_wait_stable(folio);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue