staging/lustre/mdc: remove unused OBD methods
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 5 Sep 2014 20:08:11 +0000 (15:08 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 19:37:04 +0000 (12:37 -0700)
Remove the unused OBD device methods mdc_pin() and mdc_unpin().

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/mdc/mdc_request.c

index e6e25155595ed9bfa5ee49c32049d627f4aff075..bc219d1e137cf287c725abe466250f255d90ced3 100644 (file)
@@ -2263,94 +2263,6 @@ int mdc_get_info(const struct lu_env *env, struct obd_export *exp,
        return rc;
 }
 
-static int mdc_pin(struct obd_export *exp, const struct lu_fid *fid,
-                  struct obd_capa *oc, struct obd_client_handle *handle,
-                  int flags)
-{
-       struct ptlrpc_request *req;
-       struct mdt_body       *body;
-       int                 rc;
-
-       req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_PIN);
-       if (req == NULL)
-               return -ENOMEM;
-
-       mdc_set_capa_size(req, &RMF_CAPA1, oc);
-
-       rc = ptlrpc_request_pack(req, LUSTRE_MDS_VERSION, MDS_PIN);
-       if (rc) {
-               ptlrpc_request_free(req);
-               return rc;
-       }
-
-       mdc_pack_body(req, fid, oc, 0, 0, -1, flags);
-
-       ptlrpc_request_set_replen(req);
-
-       mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-       rc = ptlrpc_queue_wait(req);
-       mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-       if (rc) {
-               CERROR("Pin failed: %d\n", rc);
-               goto err_out;
-       }
-
-       body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
-       if (body == NULL) {
-               rc = -EPROTO;
-               goto err_out;
-       }
-
-       handle->och_fh = body->handle;
-       handle->och_magic = OBD_CLIENT_HANDLE_MAGIC;
-
-       handle->och_mod = obd_mod_alloc();
-       if (handle->och_mod == NULL) {
-               DEBUG_REQ(D_ERROR, req, "can't allocate md_open_data");
-               rc = -ENOMEM;
-               goto err_out;
-       }
-       handle->och_mod->mod_open_req = req; /* will be dropped by unpin */
-
-       return 0;
-
-err_out:
-       ptlrpc_req_finished(req);
-       return rc;
-}
-
-static int mdc_unpin(struct obd_export *exp, struct obd_client_handle *handle,
-                    int flag)
-{
-       struct ptlrpc_request *req;
-       struct mdt_body       *body;
-       int                 rc;
-
-       req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp), &RQF_MDS_UNPIN,
-                                       LUSTRE_MDS_VERSION, MDS_UNPIN);
-       if (req == NULL)
-               return -ENOMEM;
-
-       body = req_capsule_client_get(&req->rq_pill, &RMF_MDT_BODY);
-       body->handle = handle->och_fh;
-       body->flags = flag;
-
-       ptlrpc_request_set_replen(req);
-
-       mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-       rc = ptlrpc_queue_wait(req);
-       mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-
-       if (rc != 0)
-               CERROR("Unpin failed: %d\n", rc);
-
-       ptlrpc_req_finished(req);
-       ptlrpc_req_finished(handle->och_mod->mod_open_req);
-
-       obd_mod_put(handle->och_mod);
-       return rc;
-}
-
 int mdc_sync(struct obd_export *exp, const struct lu_fid *fid,
             struct obd_capa *oc, struct ptlrpc_request **request)
 {
@@ -2756,8 +2668,6 @@ struct obd_ops mdc_obd_ops = {
        .o_iocontrol    = mdc_iocontrol,
        .o_set_info_async   = mdc_set_info_async,
        .o_statfs          = mdc_statfs,
-       .o_pin        = mdc_pin,
-       .o_unpin            = mdc_unpin,
        .o_fid_init         = client_fid_init,
        .o_fid_fini         = client_fid_fini,
        .o_fid_alloc    = mdc_fid_alloc,