]> git.baikalelectronics.ru Git - kernel.git/commit
jbd2: Don't call __bforget() unnecessarily
authorJan Kara <jack@suse.cz>
Fri, 9 Aug 2019 12:42:31 +0000 (14:42 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 21 Oct 2019 13:16:46 +0000 (09:16 -0400)
commite227c3571f32b0c4420856cec378ee4f48959f6f
tree6781e026345c545f7f483346fb3ac509170df567
parent207e1bc81a542ced5504008bb619e9ee2c5d5080
jbd2: Don't call __bforget() unnecessarily

jbd2_journal_forget() jumps to 'not_jbd' branch which calls __bforget()
in cases where the buffer is clean which is pointless. In case of failed
assertion, it can be even argued that it is safer not to touch buffer's
dirty bits. Also logically it makes more sense to just jump to 'drop'
and that will make logic also simpler when we switch bh_state_lock to a
spinlock.

Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20190809124233.13277-6-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/transaction.c