aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 31ace3dd33e4..de1520ccc0d4 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2170,7 +2170,8 @@ static void rbd_img_request_destroy(struct kref *kref)
2170 rbd_dev_parent_put(img_request->rbd_dev); 2170 rbd_dev_parent_put(img_request->rbd_dev);
2171 } 2171 }
2172 2172
2173 if (img_request_write_test(img_request)) 2173 if (img_request_write_test(img_request) ||
2174 img_request_discard_test(img_request))
2174 ceph_put_snap_context(img_request->snapc); 2175 ceph_put_snap_context(img_request->snapc);
2175 2176
2176 kmem_cache_free(rbd_img_request_cache, img_request); 2177 kmem_cache_free(rbd_img_request_cache, img_request);