diff options
| author | Bean Huo <[email protected]> | 2023-06-26 05:55:18 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-08-18 17:12:07 +0000 |
| commit | a524fcfe190da16bbf1311b6636f51d81f35d59a (patch) | |
| tree | 9217a2cb9f783970dff36b7f59a50f2a954c5023 /fs/ext4/move_extent.c | |
| parent | fs/buffer: clean up block_commit_write (diff) | |
| download | kernel-a524fcfe190da16bbf1311b6636f51d81f35d59a.tar.gz kernel-a524fcfe190da16bbf1311b6636f51d81f35d59a.zip | |
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/[email protected]
Signed-off-by: Bean Huo <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Acked-by: Theodore Ts'o <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Matthew Wilcox (Oracle) <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Andreas Dilger <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Joseph Qi <[email protected]>
Cc: Luís Henriques <[email protected]>
Cc: Mark Fasheh <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'fs/ext4/move_extent.c')
| -rw-r--r-- | fs/ext4/move_extent.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c index b5af2fc03b2f..f4b4861a74ee 100644 --- a/fs/ext4/move_extent.c +++ b/fs/ext4/move_extent.c @@ -392,14 +392,11 @@ data_copy: for (i = 0; i < block_len_in_page; i++) { *err = ext4_get_block(orig_inode, orig_blk_offset + i, bh, 0); if (*err < 0) - break; + goto repair_branches; bh = bh->b_this_page; } - if (!*err) - *err = block_commit_write(&folio[0]->page, from, from + replaced_size); - if (unlikely(*err < 0)) - goto repair_branches; + block_commit_write(&folio[0]->page, from, from + replaced_size); /* Even in case of data=writeback it is reasonable to pin * inode to transaction, to prevent unexpected data loss */ |
