+ fs-reiserfs-remove-unnecessary-check-of-bh-in-remove_from_transaction.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: fs: reiserfs: remove unnecessary check of bh in remove_from_transaction()
has been added to the -mm tree.  Its filename is
     fs-reiserfs-remove-unnecessary-check-of-bh-in-remove_from_transaction.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/fs-reiserfs-remove-unnecessary-check-of-bh-in-remove_from_transaction.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/fs-reiserfs-remove-unnecessary-check-of-bh-in-remove_from_transaction.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Jia-Ju Bai <baijiaju1990@xxxxxxxxx>
Subject: 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@xxxxxxxxx
Signed-off-by: Jia-Ju Bai <baijiaju1990@xxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Hariprasad Kelam <hariprasad.kelam@xxxxxxxxx>
Cc: Bharath Vedartham <linux.bhar@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/reiserfs/journal.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- a/fs/reiserfs/journal.c~fs-reiserfs-remove-unnecessary-check-of-bh-in-remove_from_transaction
+++ a/fs/reiserfs/journal.c
@@ -3444,9 +3444,8 @@ static int remove_from_transaction(struc
 	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) {
_

Patches currently in -mm which might be from baijiaju1990@xxxxxxxxx are

fs-reiserfs-remove-unnecessary-check-of-bh-in-remove_from_transaction.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux