mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
fs/buffer: Combine two submit_bh() and ll_rw_block() arguments
Both submit_bh() and ll_rw_block() accept a request operation type and request flags as their first two arguments. Micro-optimize these two functions by combining these first two arguments into a single argument. This patch does not change the behavior of any of the modified code. Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Jan Kara <jack@suse.cz> Acked-by: Song Liu <song@kernel.org> (for the md changes) Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20220714180729.1065367-48-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
3ae7286943
commit
1420c4a549
@@ -155,10 +155,10 @@ 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);
|
||||
ret = submit_bh(REQ_OP_WRITE | REQ_SYNC | REQ_PREFLUSH |
|
||||
REQ_FUA, bh);
|
||||
else
|
||||
ret = submit_bh(REQ_OP_WRITE, REQ_SYNC, bh);
|
||||
ret = submit_bh(REQ_OP_WRITE | REQ_SYNC, bh);
|
||||
|
||||
*cbh = bh;
|
||||
return ret;
|
||||
@@ -763,7 +763,7 @@ start_journal_io:
|
||||
clear_buffer_dirty(bh);
|
||||
set_buffer_uptodate(bh);
|
||||
bh->b_end_io = journal_end_buffer_io_sync;
|
||||
submit_bh(REQ_OP_WRITE, REQ_SYNC, bh);
|
||||
submit_bh(REQ_OP_WRITE | REQ_SYNC, bh);
|
||||
}
|
||||
cond_resched();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user