staging/lustre/ldlm: Remove unused ldlm_cli_enqueue_local()
authorOleg Drokin <green@linuxhacker.ru>
Thu, 1 Oct 2015 04:12:22 +0000 (00:12 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2015 09:17:19 +0000 (11:17 +0200)
This is only used on the server.
Also while we are at it, remove unused prototypes for
ldlm_server_ast and ldlm_handle_enqueue0() that are not
defined anywhere

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_request.c

index 40377b21a431f52ef9760f75357930bd74dbe3fc..ce91ccc358a763be26dfc43a64ea2845c908487c 100644 (file)
@@ -1308,25 +1308,10 @@ int ldlm_prep_elc_req(struct obd_export *exp,
                      struct list_head *cancels, int count);
 
 struct ptlrpc_request *ldlm_enqueue_pack(struct obd_export *exp, int lvb_len);
-int ldlm_handle_enqueue0(struct ldlm_namespace *ns, struct ptlrpc_request *req,
-                        const struct ldlm_request *dlm_req,
-                        const struct ldlm_callback_suite *cbs);
 int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
                          ldlm_type_t type, __u8 with_policy, ldlm_mode_t mode,
                          __u64 *flags, void *lvb, __u32 lvb_len,
                          struct lustre_handle *lockh, int rc);
-int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
-                          const struct ldlm_res_id *res_id,
-                          ldlm_type_t type, ldlm_policy_data_t *policy,
-                          ldlm_mode_t mode, __u64 *flags,
-                          ldlm_blocking_callback blocking,
-                          ldlm_completion_callback completion,
-                          ldlm_glimpse_callback glimpse,
-                          void *data, __u32 lvb_len, enum lvb_type lvb_type,
-                          const __u64 *client_cookie,
-                          struct lustre_handle *lockh);
-int ldlm_server_ast(struct lustre_handle *lockh, struct ldlm_lock_desc *new,
-                   void *data, __u32 data_len);
 int ldlm_cli_update_pool(struct ptlrpc_request *req);
 int ldlm_cli_cancel(struct lustre_handle *lockh,
                    ldlm_cancel_flags_t cancel_flags);
index 760c7452b97eb0aea242382c2ae53acbf9c30be9..9856133306e3532ce93461cc8cd109b15be6fb36 100644 (file)
@@ -386,74 +386,6 @@ int ldlm_glimpse_ast(struct ldlm_lock *lock, void *reqp)
 }
 EXPORT_SYMBOL(ldlm_glimpse_ast);
 
-/**
- * Enqueue a local lock (typically on a server).
- */
-int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
-                          const struct ldlm_res_id *res_id,
-                          ldlm_type_t type, ldlm_policy_data_t *policy,
-                          ldlm_mode_t mode, __u64 *flags,
-                          ldlm_blocking_callback blocking,
-                          ldlm_completion_callback completion,
-                          ldlm_glimpse_callback glimpse,
-                          void *data, __u32 lvb_len, enum lvb_type lvb_type,
-                          const __u64 *client_cookie,
-                          struct lustre_handle *lockh)
-{
-       struct ldlm_lock *lock;
-       int err;
-       const struct ldlm_callback_suite cbs = { .lcs_completion = completion,
-                                                .lcs_blocking   = blocking,
-                                                .lcs_glimpse    = glimpse,
-       };
-
-       LASSERT(!(*flags & LDLM_FL_REPLAY));
-       if (unlikely(ns_is_client(ns))) {
-               CERROR("Trying to enqueue local lock in a shadow namespace\n");
-               LBUG();
-       }
-
-       lock = ldlm_lock_create(ns, res_id, type, mode, &cbs, data, lvb_len,
-                               lvb_type);
-       if (unlikely(!lock)) {
-               err = -ENOMEM;
-               goto out_nolock;
-       }
-
-       ldlm_lock2handle(lock, lockh);
-
-       /* NB: we don't have any lock now (lock_res_and_lock)
-        * because it's a new lock */
-       ldlm_lock_addref_internal_nolock(lock, mode);
-       lock->l_flags |= LDLM_FL_LOCAL;
-       if (*flags & LDLM_FL_ATOMIC_CB)
-               lock->l_flags |= LDLM_FL_ATOMIC_CB;
-
-       if (policy != NULL)
-               lock->l_policy_data = *policy;
-       if (client_cookie != NULL)
-               lock->l_client_cookie = *client_cookie;
-       if (type == LDLM_EXTENT)
-               lock->l_req_extent = policy->l_extent;
-
-       err = ldlm_lock_enqueue(ns, &lock, policy, flags);
-       if (unlikely(err != ELDLM_OK))
-               goto out;
-
-       if (policy != NULL)
-               *policy = lock->l_policy_data;
-
-       if (lock->l_completion_ast)
-               lock->l_completion_ast(lock, *flags, NULL);
-
-       LDLM_DEBUG(lock, "client-side local enqueue handler, new lock created");
- out:
-       LDLM_LOCK_RELEASE(lock);
- out_nolock:
-       return err;
-}
-EXPORT_SYMBOL(ldlm_cli_enqueue_local);
-
 static void failed_lock_cleanup(struct ldlm_namespace *ns,
                                struct ldlm_lock *lock, int mode)
 {