diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-04-26 15:05:29 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-26 00:36:20 +0200 |
commit | 3ed97d6345a36a0a61e6af62ad8a66ca40f1aa2e (patch) | |
tree | 8169875c78caa8e2bede29204fbb29f72b299edc /net | |
parent | 663ae2cc04773608e1e741f693e41200fd4faf14 (diff) |
libceph: make ceph_osdc_put_request() accept NULL
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osd_client.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 40a53a70efdf..cacce9e35f08 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -354,9 +354,11 @@ EXPORT_SYMBOL(ceph_osdc_get_request); void ceph_osdc_put_request(struct ceph_osd_request *req) { - dout("%s %p (was %d)\n", __func__, req, - atomic_read(&req->r_kref.refcount)); - kref_put(&req->r_kref, ceph_osdc_release_request); + if (req) { + dout("%s %p (was %d)\n", __func__, req, + atomic_read(&req->r_kref.refcount)); + kref_put(&req->r_kref, ceph_osdc_release_request); + } } EXPORT_SYMBOL(ceph_osdc_put_request); |