Whamcloud - gitweb
LU-6142 osc: minor function cleanups. 37/39737/2
authorMr NeilBrown <neilb@suse.de>
Thu, 27 Aug 2020 01:36:06 +0000 (11:36 +1000)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 21:42:23 +0000 (21:42 +0000)
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 <neilb@suse.de>
Change-Id: I048e4ec1ec62d2b576f2a1e3c6148c0121cd91b6
Reviewed-on: https://review.whamcloud.com/39737
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_cache.c
lustre/osc/osc_internal.h

index 9c29955..2d864f7 100644 (file)
@@ -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.
  */
 /**
  * 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);
 {
        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);
        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);
                osc_io_unplug_async(env, cli, obj);
        }
        osc_extent_put(env, ext);
-       RETURN(rc);
+
+       RETURN_EXIT;
 }
 
 /**
 }
 
 /**
index 8b54535..b2fb762 100644 (file)
@@ -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 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);
 
 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);
 
 
 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);
 int osc_setup(struct obd_device *obd, struct lustre_cfg *lcfg);
 
 int osc_tunables_init(struct obd_device *obd);