Whamcloud - gitweb
LU-6142 mdc: minor function cleanups. 38/39738/2
authorMr NeilBrown <neilb@suse.de>
Thu, 27 Aug 2020 03:28:42 +0000 (13:28 +1000)
committerOleg Drokin <green@whamcloud.com>
Fri, 26 Feb 2021 21:42:27 +0000 (21:42 +0000)
mdc_getxattr_pack() doesn't exist, so remove declaration

mdc_get_lustre_md(), mdc_free_lustre_md(), and
mdc_clear_open_replay_data() are local to mdc_request.c so make them
static and remove declaration from mdc_interal.h.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ie925585f51f280a4ad4e3ae7b488dc4166fdaa8d
Reviewed-on: https://review.whamcloud.com/39738
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/mdc/mdc_internal.h
lustre/mdc/mdc_request.c

index 29bccbb..792cdbf 100644 (file)
@@ -61,7 +61,6 @@ void mdc_file_encctx_pack(struct ptlrpc_request *req,
 void mdc_file_sepol_pack(struct ptlrpc_request *req);
 
 void mdc_unlink_pack(struct ptlrpc_request *req, struct md_op_data *op_data);
 void mdc_file_sepol_pack(struct ptlrpc_request *req);
 
 void mdc_unlink_pack(struct ptlrpc_request *req, struct md_op_data *op_data);
-void mdc_getxattr_pack(struct ptlrpc_request *req, struct md_op_data *op_data);
 void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data);
 void mdc_rename_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
                     const char *old, size_t oldlen,
 void mdc_link_pack(struct ptlrpc_request *req, struct md_op_data *op_data);
 void mdc_rename_pack(struct ptlrpc_request *req, struct md_op_data *op_data,
                     const char *old, size_t oldlen,
@@ -102,18 +101,10 @@ int mdc_setup(struct obd_device *obd, struct lustre_cfg *cfg);
 
 struct obd_client_handle;
 
 
 struct obd_client_handle;
 
-int mdc_get_lustre_md(struct obd_export *md_exp, struct ptlrpc_request *req,
-                      struct obd_export *dt_exp, struct obd_export *lmv_exp,
-                      struct lustre_md *md);
-
-int mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md);
-
 int mdc_set_open_replay_data(struct obd_export *exp,
                             struct obd_client_handle *och,
                             struct lookup_intent *it);
 
 int mdc_set_open_replay_data(struct obd_export *exp,
                             struct obd_client_handle *och,
                             struct lookup_intent *it);
 
-int mdc_clear_open_replay_data(struct obd_export *exp,
-                               struct obd_client_handle *och);
 void mdc_commit_open(struct ptlrpc_request *req);
 void mdc_replay_open(struct ptlrpc_request *req);
 
 void mdc_commit_open(struct ptlrpc_request *req);
 void mdc_replay_open(struct ptlrpc_request *req);
 
index a97026b..2a5b2c7 100644 (file)
@@ -507,9 +507,10 @@ out:
        return rc;
 }
 
        return rc;
 }
 
-int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
-                      struct obd_export *dt_exp, struct obd_export *md_exp,
-                      struct lustre_md *md)
+static int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req,
+                            struct obd_export *dt_exp,
+                            struct obd_export *md_exp,
+                            struct lustre_md *md)
 {
         struct req_capsule *pill = &req->rq_pill;
         int rc;
 {
         struct req_capsule *pill = &req->rq_pill;
         int rc;
@@ -624,10 +625,10 @@ out:
        return rc;
 }
 
        return rc;
 }
 
-int mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md)
+static int mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md)
 {
 {
-        ENTRY;
-        RETURN(0);
+       ENTRY;
+       RETURN(0);
 }
 
 void mdc_replay_open(struct ptlrpc_request *req)
 }
 
 void mdc_replay_open(struct ptlrpc_request *req)
@@ -812,18 +813,18 @@ static void mdc_free_open(struct md_open_data *mod)
                ptlrpc_request_committed(mod->mod_close_req, committed);
 }
 
                ptlrpc_request_committed(mod->mod_close_req, committed);
 }
 
-int mdc_clear_open_replay_data(struct obd_export *exp,
-                               struct obd_client_handle *och)
+static int mdc_clear_open_replay_data(struct obd_export *exp,
+                                     struct obd_client_handle *och)
 {
 {
-        struct md_open_data *mod = och->och_mod;
-        ENTRY;
+       struct md_open_data *mod = och->och_mod;
+       ENTRY;
 
 
-        /**
-         * It is possible to not have \var mod in a case of eviction between
-         * lookup and ll_file_open().
-         **/
-        if (mod == NULL)
-                RETURN(0);
+       /**
+        * It is possible to not have \var mod in a case of eviction between
+        * lookup and ll_file_open().
+        **/
+       if (mod == NULL)
+               RETURN(0);
 
        LASSERT(mod != LP_POISON);
        LASSERT(mod->mod_open_req != NULL);
 
        LASSERT(mod != LP_POISON);
        LASSERT(mod->mod_open_req != NULL);
@@ -835,11 +836,11 @@ int mdc_clear_open_replay_data(struct obd_export *exp,
        spin_unlock(&mod->mod_open_req->rq_lock);
        mdc_free_open(mod);
 
        spin_unlock(&mod->mod_open_req->rq_lock);
        mdc_free_open(mod);
 
-        mod->mod_och = NULL;
-        och->och_mod = NULL;
-        obd_mod_put(mod);
+       mod->mod_och = NULL;
+       och->och_mod = NULL;
+       obd_mod_put(mod);
 
 
-        RETURN(0);
+       RETURN(0);
 }
 
 static int mdc_close(struct obd_export *exp, struct md_op_data *op_data,
 }
 
 static int mdc_close(struct obd_export *exp, struct md_op_data *op_data,