Whamcloud - gitweb
LU-14138 ptlrpc: move more members in PTLRPC request into pill
[fs/lustre-release.git] / lustre / llite / llite_lib.c
index c11da6c..819c072 100644 (file)
@@ -663,8 +663,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)
                GOTO(out_lock_cn_cb, err);
        }
 
-       err = md_get_lustre_md(sbi->ll_md_exp, request, sbi->ll_dt_exp,
-                              sbi->ll_md_exp, &lmd);
+       err = md_get_lustre_md(sbi->ll_md_exp, &request->rq_pill,
+                              sbi->ll_dt_exp, sbi->ll_md_exp, &lmd);
        if (err) {
                CERROR("failed to understand root inode md: rc = %d\n", err);
                ptlrpc_req_finished(request);
@@ -1812,8 +1812,8 @@ static int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data)
                RETURN(rc);
        }
 
-        rc = md_get_lustre_md(sbi->ll_md_exp, request, sbi->ll_dt_exp,
-                              sbi->ll_md_exp, &md);
+       rc = md_get_lustre_md(sbi->ll_md_exp, &request->rq_pill, sbi->ll_dt_exp,
+                             sbi->ll_md_exp, &md);
         if (rc) {
                 ptlrpc_req_finished(request);
                 RETURN(rc);
@@ -2859,7 +2859,7 @@ int ll_remount_fs(struct super_block *sb, int *flags, char *data)
  * \param[in] sb       super block for this file-system
  * \param[in] open_req pointer to the original open request
  */
-void ll_open_cleanup(struct super_block *sb, struct ptlrpc_request *open_req)
+void ll_open_cleanup(struct super_block *sb, struct req_capsule *pill)
 {
        struct mdt_body                 *body;
        struct md_op_data               *op_data;
@@ -2867,7 +2867,7 @@ void ll_open_cleanup(struct super_block *sb, struct ptlrpc_request *open_req)
        struct obd_export               *exp       = ll_s2sbi(sb)->ll_md_exp;
        ENTRY;
 
-       body = req_capsule_server_get(&open_req->rq_pill, &RMF_MDT_BODY);
+       body = req_capsule_server_get(pill, &RMF_MDT_BODY);
        OBD_ALLOC_PTR(op_data);
        if (op_data == NULL) {
                CWARN("%s: cannot allocate op_data to release open handle for "
@@ -2886,7 +2886,7 @@ void ll_open_cleanup(struct super_block *sb, struct ptlrpc_request *open_req)
        EXIT;
 }
 
-int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
+int ll_prep_inode(struct inode **inode, struct req_capsule *pill,
                  struct super_block *sb, struct lookup_intent *it)
 {
        struct ll_sb_info *sbi = NULL;
@@ -2898,7 +2898,7 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
 
        LASSERT(*inode || sb);
        sbi = sb ? ll_s2sbi(sb) : ll_i2sbi(*inode);
-       rc = md_get_lustre_md(sbi->ll_md_exp, req, sbi->ll_dt_exp,
+       rc = md_get_lustre_md(sbi->ll_md_exp, pill, sbi->ll_dt_exp,
                              sbi->ll_md_exp, &md);
        if (rc != 0)
                GOTO(out, rc);
@@ -2988,7 +2988,7 @@ out:
 
        if (rc != 0 && it != NULL && it->it_op & IT_OPEN) {
                ll_intent_drop_lock(it);
-               ll_open_cleanup(sb != NULL ? sb : (*inode)->i_sb, req);
+               ll_open_cleanup(sb != NULL ? sb : (*inode)->i_sb, pill);
        }
 
        return rc;