From 3ed97d6345a36a0a61e6af62ad8a66ca40f1aa2e Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Tue, 26 Apr 2016 15:05:29 +0200 Subject: libceph: make ceph_osdc_put_request() accept NULL Signed-off-by: Ilya Dryomov --- fs/ceph/addr.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'fs/ceph') diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 4801571f51cb..3e61fc8bb371 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1099,8 +1099,7 @@ release_pvec_pages: mapping->writeback_index = index; out: - if (req) - ceph_osdc_put_request(req); + ceph_osdc_put_request(req); ceph_put_snap_context(snapc); dout("writepages done, rc = %d\n", rc); return rc; @@ -1824,10 +1823,8 @@ static int __ceph_pool_perm_get(struct ceph_inode_info *ci, u32 pool) out_unlock: up_write(&mdsc->pool_perm_rwsem); - if (rd_req) - ceph_osdc_put_request(rd_req); - if (wr_req) - ceph_osdc_put_request(wr_req); + ceph_osdc_put_request(rd_req); + ceph_osdc_put_request(wr_req); out: if (!err) err = have; -- cgit v1.2.3