diff mbox series

[4/6] ceph: change return type of ceph_unreserve_caps() to void

Message ID 20180728151540.11253-5-cgxu519@gmx.com (mailing list archive)
State New, archived
Headers show
Series code cleanup and minor optimization for cap reservation | expand

Commit Message

Chengguang Xu July 28, 2018, 3:15 p.m. UTC
ceph_unreserve_caps() always returns 0 and also callers
do not check return code.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
---
 fs/ceph/caps.c  | 3 +--
 fs/ceph/super.h | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

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,