+ fat-delete-an-unnecessary-check-before-brelse.patch added to -mm tree

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

 



The patch titled
     Subject: fat: Delete an unnecessary check before brelse()
has been added to the -mm tree.  Its filename is
     fat-delete-an-unnecessary-check-before-brelse.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/fat-delete-an-unnecessary-check-before-brelse.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/fat-delete-an-unnecessary-check-before-brelse.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: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Subject: fat: Delete an unnecessary check before brelse()

brelse() tests whether its argument is NULL and then returns immediately. 
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Link: http://lkml.kernel.org/r/cfff3b81-fb5d-af26-7b5e-724266509045@xxxxxx
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Acked-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/fat/dir.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/fs/fat/dir.c~fat-delete-an-unnecessary-check-before-brelse
+++ a/fs/fat/dir.c
@@ -88,9 +88,7 @@ static int fat__get_entry(struct inode *
 	int err, offset;
 
 next:
-	if (*bh)
-		brelse(*bh);
-
+	brelse(*bh);
 	*bh = NULL;
 	iblock = *pos >> sb->s_blocksize_bits;
 	err = fat_bmap(dir, iblock, &phys, &mapped_blocks, 0, false);
_

Patches currently in -mm which might be from elfring@xxxxxxxxxxxxxxxxxxxxx are

ocfs2-delete-unnecessary-checks-before-brelse.patch
fat-delete-an-unnecessary-check-before-brelse.patch
ipc-mqueuec-delete-an-unnecessary-check-before-the-macro-call-dev_kfree_skb.patch
ipc-mqueue-improve-exception-handling-in-do_mq_notify.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