Commit ab620620 authored by Ritesh Harjani (IBM)'s avatar Ritesh Harjani (IBM) Committed by Theodore Ts'o

fs/buffer: drop useless return value of submit_bh

submit_bh always returns 0. This patch drops the useless return value of
submit_bh from __sync_dirty_buffer(). Once all of submit_bh callers are
cleaned up, we can make it's return type as void.
Signed-off-by: default avatarRitesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/a98a6ddfac68f73d684c2724952e825bc1f4d238.1660788334.git.ritesh.list@gmail.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent c5475248
...@@ -2801,8 +2801,6 @@ EXPORT_SYMBOL(write_dirty_buffer); ...@@ -2801,8 +2801,6 @@ EXPORT_SYMBOL(write_dirty_buffer);
*/ */
int __sync_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags) int __sync_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags)
{ {
int ret = 0;
WARN_ON(atomic_read(&bh->b_count) < 1); WARN_ON(atomic_read(&bh->b_count) < 1);
lock_buffer(bh); lock_buffer(bh);
if (test_clear_buffer_dirty(bh)) { if (test_clear_buffer_dirty(bh)) {
...@@ -2817,14 +2815,14 @@ int __sync_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags) ...@@ -2817,14 +2815,14 @@ int __sync_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags)
get_bh(bh); get_bh(bh);
bh->b_end_io = end_buffer_write_sync; bh->b_end_io = end_buffer_write_sync;
ret = submit_bh(REQ_OP_WRITE | op_flags, bh); submit_bh(REQ_OP_WRITE | op_flags, bh);
wait_on_buffer(bh); wait_on_buffer(bh);
if (!ret && !buffer_uptodate(bh)) if (!buffer_uptodate(bh))
ret = -EIO; return -EIO;
} else { } else {
unlock_buffer(bh); unlock_buffer(bh);
} }
return ret; return 0;
} }
EXPORT_SYMBOL(__sync_dirty_buffer); EXPORT_SYMBOL(__sync_dirty_buffer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment