summaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.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 /drivers/block/rbd.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 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 27b71a0b72d0..3c34ab55537c 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -3405,8 +3405,7 @@ err_rq:
3405 if (result) 3405 if (result)
3406 rbd_warn(rbd_dev, "%s %llx at %llx result %d", 3406 rbd_warn(rbd_dev, "%s %llx at %llx result %d",
3407 obj_op_name(op_type), length, offset, result); 3407 obj_op_name(op_type), length, offset, result);
3408 if (snapc) 3408 ceph_put_snap_context(snapc);
3409 ceph_put_snap_context(snapc);
3410 blk_end_request_all(rq, result); 3409 blk_end_request_all(rq, result);
3411} 3410}
3412 3411