mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
jbd2: drop useless return value of submit_bh
submit_bh always returns 0. This patch cleans up 2 of it's caller in jbd2 to drop submit_bh's useless return value. Once all submit_bh callers are cleaned up, we can make it's return type as void. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Link: https://lore.kernel.org/r/e069c0539be0aec61abcdc6f6141982ec85d489d.1660788334.git.ritesh.list@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
3b575495ab
commit
f3ed5df398
@@ -122,8 +122,8 @@ static int journal_submit_commit_record(journal_t *journal,
|
||||
{
|
||||
struct commit_header *tmp;
|
||||
struct buffer_head *bh;
|
||||
int ret;
|
||||
struct timespec64 now;
|
||||
blk_opf_t write_flags = REQ_OP_WRITE | REQ_SYNC;
|
||||
|
||||
*cbh = NULL;
|
||||
|
||||
@@ -155,13 +155,11 @@ static int journal_submit_commit_record(journal_t *journal,
|
||||
|
||||
if (journal->j_flags & JBD2_BARRIER &&
|
||||
!jbd2_has_feature_async_commit(journal))
|
||||
ret = submit_bh(REQ_OP_WRITE | REQ_SYNC | REQ_PREFLUSH |
|
||||
REQ_FUA, bh);
|
||||
else
|
||||
ret = submit_bh(REQ_OP_WRITE | REQ_SYNC, bh);
|
||||
write_flags |= REQ_PREFLUSH | REQ_FUA;
|
||||
|
||||
submit_bh(write_flags, bh);
|
||||
*cbh = bh;
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user