Staging: lustre: ldlm_pool: Drop unneeded wrapper function
authorShivani Bhardwaj <shivanib134@gmail.com>
Fri, 6 Nov 2015 17:44:32 +0000 (23:14 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
Remove the function ldlm_pool_set_limit() and replace its calls with the
function it wrapped.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_pool.c

index 20cf38931ea7537c769935ca66233870fcef2559..e59b2864180fd02f221e884ede314d708afa8e25 100644 (file)
@@ -207,14 +207,6 @@ static inline int ldlm_pool_t2gsp(unsigned int t)
                 (t >> LDLM_POOL_GSP_STEP_SHIFT));
 }
 
-/**
- * Sets passed \a limit to \a pl.
- */
-static void ldlm_pool_set_limit(struct ldlm_pool *pl, __u32 limit)
-{
-       atomic_set(&pl->pl_limit, limit);
-}
-
 /**
  * Recalculates next stats on passed \a pl.
  *
@@ -257,7 +249,7 @@ static void ldlm_cli_pool_pop_slv(struct ldlm_pool *pl)
        LASSERT(obd != NULL);
        read_lock(&obd->obd_pool_lock);
        pl->pl_server_lock_volume = obd->obd_pool_slv;
-       ldlm_pool_set_limit(pl, obd->obd_pool_limit);
+       atomic_set(&pl->pl_limit, obd->obd_pool_limit);
        read_unlock(&obd->obd_pool_lock);
 }
 
@@ -678,7 +670,7 @@ int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns,
        snprintf(pl->pl_name, sizeof(pl->pl_name), "ldlm-pool-%s-%d",
                 ldlm_ns_name(ns), idx);
 
-       ldlm_pool_set_limit(pl, 1);
+       atomic_set(&pl->pl_limit, 1);
        pl->pl_server_lock_volume = 0;
        pl->pl_ops = &ldlm_cli_pool_ops;
        pl->pl_recalc_period = LDLM_POOL_CLI_DEF_RECALC_PERIOD;