ceph_unreserve_caps() always returns 0 and also callers do not check return code. Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx> --- fs/ceph/caps.c | 3 +-- fs/ceph/super.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 22eb70742c0b..976d283a6a4e 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -292,7 +292,7 @@ int ceph_reserve_caps(struct ceph_mds_client *mdsc, return err; } -int ceph_unreserve_caps(struct ceph_mds_client *mdsc, +void ceph_unreserve_caps(struct ceph_mds_client *mdsc, struct ceph_cap_reservation *ctx) { dout("unreserve caps ctx=%p count=%d\n", ctx, ctx->count); @@ -300,7 +300,6 @@ int ceph_unreserve_caps(struct ceph_mds_client *mdsc, __ceph_unreserve_caps(mdsc, ctx->count); ctx->count = 0; spin_unlock(&mdsc->caps_list_lock); - return 0; } struct ceph_cap *ceph_get_cap(struct ceph_mds_client *mdsc, diff --git a/fs/ceph/super.h b/fs/ceph/super.h index fe11d6903b29..98f464687674 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -659,7 +659,7 @@ extern void ceph_caps_finalize(struct ceph_mds_client *mdsc); extern void ceph_adjust_min_caps(struct ceph_mds_client *mdsc, int delta); extern int ceph_reserve_caps(struct ceph_mds_client *mdsc, struct ceph_cap_reservation *ctx, int need); -extern int ceph_unreserve_caps(struct ceph_mds_client *mdsc, +extern void ceph_unreserve_caps(struct ceph_mds_client *mdsc, struct ceph_cap_reservation *ctx); extern void ceph_reservation_status(struct ceph_fs_client *client, int *total, int *avail, int *used, -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html