aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorSF Markus Elfring <elfring@users.sourceforge.net>2014-11-02 09:20:59 -0500
committerIlya Dryomov <idryomov@redhat.com>2014-12-17 12:09:50 -0500
commite96a650a8174e20112b400e72e0b2429aa66de20 (patch)
tree44fa588afe9ee1b9504016e012c3dcffb184b87b /fs/ceph/caps.c
parent70db4f3629b3476cf506be869ef9d15688d2d44a (diff)
ceph, rbd: delete unnecessary checks before two function calls
The functions ceph_put_snap_context() and iput() test whether their argument is NULL and then return 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> [idryomov@redhat.com: squashed rbd.c hunk, changelog] Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r--fs/ceph/caps.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index cefca661464b..eb1bf1f35e0e 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -3137,8 +3137,7 @@ flush_cap_releases:
3137done: 3137done:
3138 mutex_unlock(&session->s_mutex); 3138 mutex_unlock(&session->s_mutex);
3139done_unlocked: 3139done_unlocked:
3140 if (inode) 3140 iput(inode);
3141 iput(inode);
3142 return; 3141 return;
3143 3142
3144bad: 3143bad: