From: Jia-Ju Bai Date: Wed, 25 Sep 2019 23:46:55 +0000 (-0700) Subject: fs: reiserfs: remove unnecessary check of bh in remove_from_transaction() X-Git-Tag: v5.15~5421^2~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d256085be12dc3b24e7b19c357e975a37dbff509;p=platform%2Fkernel%2Flinux-starfive.git fs: reiserfs: remove unnecessary check of bh in remove_from_transaction() On lines 3430-3434, bh has been assured to be non-null: cn = get_journal_hash_dev(sb, journal->j_hash_table, blocknr); if (!cn || !cn->bh) { return ret; } bh = cn->bh; Thus, the check of bh on line 3447 is unnecessary and can be removed. Thank Andrew Morton for good advice. Link: http://lkml.kernel.org/r/20190727084019.11307-1-baijiaju1990@gmail.com Signed-off-by: Jia-Ju Bai Reviewed-by: Jan Kara Cc: Arnd Bergmann Cc: Hariprasad Kelam Cc: Bharath Vedartham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 4517a13..11155b8 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -3444,9 +3444,8 @@ static int remove_from_transaction(struct super_block *sb, if (cn == journal->j_last) { journal->j_last = cn->prev; } - if (bh) - remove_journal_hash(sb, journal->j_hash_table, NULL, - bh->b_blocknr, 0); + remove_journal_hash(sb, journal->j_hash_table, NULL, + bh->b_blocknr, 0); clear_buffer_journaled(bh); /* don't log this one */ if (!already_cleaned) {