summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-12-11 00:54:31 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 02:41:16 +0100
commit72b9918ea4d7f2d8362a2defdb93e5fd25a86308 (patch)
treea94837bae536c36c8c382aadefd429564c98658e /fs
parentnilfs2: avoid duplicate segment construction for fsync() (diff)
downloadlinux-72b9918ea4d7f2d8362a2defdb93e5fd25a86308.tar.xz
linux-72b9918ea4d7f2d8362a2defdb93e5fd25a86308.zip
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@users.sourceforge.net> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nilfs2/the_nilfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c
index 9da25fe9ea61..69bd801afb53 100644
--- a/fs/nilfs2/the_nilfs.c
+++ b/fs/nilfs2/the_nilfs.c
@@ -808,8 +808,7 @@ void nilfs_put_root(struct nilfs_root *root)
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);
}