staging/lustre/ldlm: Remove unused ldlm_reprocess_all*()
authorOleg Drokin <green@linuxhacker.ru>
Thu, 1 Oct 2015 04:12:33 +0000 (00:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2015 09:17:19 +0000 (11:17 +0200)
They are only used on the server.
Also remove helper functions and cleanup callsites.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/lustre_dlm.h
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
drivers/staging/lustre/lustre/ldlm/ldlm_request.c

index c0b2c610d76a9c259febbd652b697595a8d6e73c..96083734c3fbe1954c66cb6da28f2d0b951a43fe 100644 (file)
@@ -1215,8 +1215,6 @@ ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags,
 ldlm_mode_t ldlm_revalidate_lock_handle(struct lustre_handle *lockh,
                                        __u64 *bits);
 void ldlm_lock_cancel(struct ldlm_lock *lock);
-void ldlm_reprocess_all(struct ldlm_resource *res);
-void ldlm_reprocess_all_ns(struct ldlm_namespace *ns);
 void ldlm_lock_dump_handle(int level, struct lustre_handle *);
 void ldlm_unlink_lock_skiplist(struct ldlm_lock *req);
 
index bb8ecc843f0ceeec6e25863150559c62c8efcda2..14e6782336470d24d6186dc0e38840f52e3c8daf 100644 (file)
@@ -523,7 +523,6 @@ reprocess:
        /* At this point we're granting the lock request. */
        req->l_granted_mode = req->l_req_mode;
 
-       /* Add req to the granted queue before calling ldlm_reprocess_all(). */
        if (!added) {
                list_del_init(&req->l_res_link);
                /* insert new lock before ownlocks in list. */
index 5a0766937d0e505f7763fbc7828af6ecb5f8c0cc..e586d33fd4bd8f72789342fef2dfb91c76068bd7 100644 (file)
@@ -1786,54 +1786,6 @@ out:
        return rc;
 }
 
-static int reprocess_one_queue(struct ldlm_resource *res, void *closure)
-{
-       ldlm_reprocess_all(res);
-       return LDLM_ITER_CONTINUE;
-}
-
-static int ldlm_reprocess_res(struct cfs_hash *hs, struct cfs_hash_bd *bd,
-                             struct hlist_node *hnode, void *arg)
-{
-       struct ldlm_resource *res = cfs_hash_object(hs, hnode);
-       int    rc;
-
-       rc = reprocess_one_queue(res, arg);
-
-       return rc == LDLM_ITER_STOP;
-}
-
-/**
- * Iterate through all resources on a namespace attempting to grant waiting
- * locks.
- */
-void ldlm_reprocess_all_ns(struct ldlm_namespace *ns)
-{
-       if (ns != NULL) {
-               cfs_hash_for_each_nolock(ns->ns_rs_hash,
-                                        ldlm_reprocess_res, NULL);
-       }
-}
-EXPORT_SYMBOL(ldlm_reprocess_all_ns);
-
-/**
- * Try to grant all waiting locks on a resource.
- *
- * Calls ldlm_reprocess_queue on converting and waiting queues.
- *
- * Typically called after some resource locks are cancelled to see
- * if anything could be granted as a result of the cancellation.
- */
-void ldlm_reprocess_all(struct ldlm_resource *res)
-{
-       LIST_HEAD(rpc_list);
-
-       if (!ns_is_client(ldlm_res_to_ns(res))) {
-               CERROR("This is client-side-only module, cannot handle LDLM_NAMESPACE_SERVER resource type lock.\n");
-               LBUG();
-       }
-}
-
 /**
  * Helper function to call blocking AST for LDLM lock \a lock in a
  * "cancelling" mode.
index a9159fda937bf62873d9dc243d383e6d6ed1e28f..15e1980831b0466449cbc8f4f4f215471e83bae5 100644 (file)
@@ -188,7 +188,6 @@ int ldlm_completion_ast_async(struct ldlm_lock *lock, __u64 flags, void *data)
        }
 
        LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, going forward");
-       ldlm_reprocess_all(lock->l_resource);
        return 0;
 }
 EXPORT_SYMBOL(ldlm_completion_ast_async);
@@ -892,9 +891,6 @@ static __u64 ldlm_cli_cancel_local(struct ldlm_lock *lock)
                        LDLM_ERROR(lock, "Trying to cancel local lock");
                        LBUG();
                }
-               LDLM_DEBUG(lock, "server-side local cancel");
-               ldlm_lock_cancel(lock);
-               ldlm_reprocess_all(lock->l_resource);
        }
 
        return rc;