From 9c4fbd1766751251d96d8ca978823a624afb4738 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Thu, 27 Aug 2020 11:36:06 +1000 Subject: [PATCH] LU-6142 osc: minor function cleanups. osc_cleanup() doesn't exist, so remove declaration. Return value of osc_extent_release() is always zero and never used, so change it to 'void'. Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: I048e4ec1ec62d2b576f2a1e3c6148c0121cd91b6 Reviewed-on: https://review.whamcloud.com/39737 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin --- lustre/osc/osc_cache.c | 6 +++--- lustre/osc/osc_internal.h | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lustre/osc/osc_cache.c b/lustre/osc/osc_cache.c index 9c29955..2d864f7 100644 --- a/lustre/osc/osc_cache.c +++ b/lustre/osc/osc_cache.c @@ -576,11 +576,10 @@ static int osc_extent_merge(const struct lu_env *env, struct osc_extent *cur, /** * Drop user count of osc_extent, and unplug IO asynchronously. */ -int osc_extent_release(const struct lu_env *env, struct osc_extent *ext) +void osc_extent_release(const struct lu_env *env, struct osc_extent *ext) { struct osc_object *obj = ext->oe_obj; struct client_obd *cli = osc_cli(obj); - int rc = 0; ENTRY; LASSERT(atomic_read(&ext->oe_users) > 0); @@ -627,7 +626,8 @@ int osc_extent_release(const struct lu_env *env, struct osc_extent *ext) osc_io_unplug_async(env, cli, obj); } osc_extent_put(env, ext); - RETURN(rc); + + RETURN_EXIT; } /** diff --git a/lustre/osc/osc_internal.h b/lustre/osc/osc_internal.h index 8b54535..b2fb762 100644 --- a/lustre/osc/osc_internal.h +++ b/lustre/osc/osc_internal.h @@ -48,7 +48,7 @@ void osc_update_next_shrink(struct client_obd *cli); int lru_queue_work(const struct lu_env *env, void *data); int osc_extent_finish(const struct lu_env *env, struct osc_extent *ext, int sent, int rc); -int osc_extent_release(const struct lu_env *env, struct osc_extent *ext); +void osc_extent_release(const struct lu_env *env, struct osc_extent *ext); int osc_lock_discard_pages(const struct lu_env *env, struct osc_object *osc, pgoff_t start, pgoff_t end, bool discard); @@ -93,7 +93,6 @@ extern struct lu_kmem_descr osc_caches[]; unsigned long osc_ldlm_weigh_ast(struct ldlm_lock *dlmlock); -int osc_cleanup(struct obd_device *obd); int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg); int osc_tunables_init(struct obd_device *obd); -- 1.8.3.1