jbd2: Don't call __bforget() unnecessarily
mainline inclusion from mainline-5.5-rc1 commit 2e710ff0 category: bugfix bugzilla: 176007 CVE: NA --------------------------- 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: NJan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20190809124233.13277-6-jack@suse.czSigned-off-by: NTheodore Ts'o <tytso@mit.edu> Conflicts: fs/jbd2/transaction.c Signed-off-by: Nyangerkun <yangerkun@huawei.com> Reviewed-by: NZhang Yi <yi.zhang@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Showing
想要评论请 注册 或 登录