+ nilfs2-deletion-of-an-unnecessary-check-before-the-function-call-iput.patch added to -mm tree

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

 



The patch titled
     Subject: nilfs2: deletion of an unnecessary check before the function call "iput"
has been added to the -mm tree.  Its filename is
     nilfs2-deletion-of-an-unnecessary-check-before-the-function-call-iput.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/nilfs2-deletion-of-an-unnecessary-check-before-the-function-call-iput.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/nilfs2-deletion-of-an-unnecessary-check-before-the-function-call-iput.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/SubmitChecklist 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: nilfs2: deletion of an unnecessary check before the function call "iput"

The iput() function 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.

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/nilfs2/the_nilfs.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -puN fs/nilfs2/the_nilfs.c~nilfs2-deletion-of-an-unnecessary-check-before-the-function-call-iput fs/nilfs2/the_nilfs.c
--- a/fs/nilfs2/the_nilfs.c~nilfs2-deletion-of-an-unnecessary-check-before-the-function-call-iput
+++ a/fs/nilfs2/the_nilfs.c
@@ -808,8 +808,7 @@ void nilfs_put_root(struct nilfs_root *r
 		spin_lock(&nilfs->ns_cptree_lock);
 		rb_erase(&root->rb_node, &nilfs->ns_cptree);
 		spin_unlock(&nilfs->ns_cptree_lock);
-		if (root->ifile)
-			iput(root->ifile);
+		iput(root->ifile);
 
 		kfree(root);
 	}
_

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

mm-zswap-deletion-of-an-unnecessary-check-before-the-function-call-free_percpu.patch
nilfs2-deletion-of-an-unnecessary-check-before-the-function-call-iput.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux