Whamcloud - gitweb
LU-7403 llite: flatten struct lookup_intent
[fs/lustre-release.git] / lustre / llite / file.c
index bbcbd29..3bbe2ad 100644 (file)
@@ -421,7 +421,7 @@ static int ll_intent_file_open(struct file *file, void *lmm, int lmmsize,
        }
 
        rc = ll_prep_inode(&de->d_inode, req, NULL, itp);
-       if (!rc && itp->d.lustre.it_lock_mode)
+       if (!rc && itp->it_lock_mode)
                ll_set_lock_data(sbi->ll_md_exp, de->d_inode, itp, NULL);
 
 out:
@@ -434,13 +434,13 @@ out:
 static int ll_och_fill(struct obd_export *md_exp, struct lookup_intent *it,
                       struct obd_client_handle *och)
 {
-       struct ptlrpc_request *req = it->d.lustre.it_data;
+       struct ptlrpc_request *req = it->it_data;
        struct mdt_body *body;
 
        body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
        och->och_fh = body->mbo_handle;
        och->och_fid = body->mbo_fid1;
-       och->och_lease_handle.cookie = it->d.lustre.it_lock_handle;
+       och->och_lease_handle.cookie = it->it_lock_handle;
        och->och_magic = OBD_CLIENT_HANDLE_MAGIC;
        och->och_flags = it->it_flags;
 
@@ -519,7 +519,7 @@ int ll_file_open(struct inode *inode, struct file *file)
                 RETURN(0);
         }
 
-        if (!it || !it->d.lustre.it_disposition) {
+       if (!it || !it->it_disposition) {
                 /* Convert f_flags into access mode. We cannot use file->f_mode,
                  * because everything but O_ACCMODE mask was stripped from
                  * there */
@@ -584,7 +584,7 @@ restart:
                 }
         } else {
                 LASSERT(*och_usecount == 0);
-                if (!it->d.lustre.it_disposition) {
+               if (!it->it_disposition) {
                         /* We cannot just request lock handle now, new ELC code
                            means that one of other OPEN locks for this file
                            could be cancelled, and since blocking ast handler
@@ -627,7 +627,7 @@ restart:
 
                LASSERTF(it_disposition(it, DISP_ENQ_OPEN_REF),
                         "inode %p: disposition %x, status %d\n", inode,
-                        it_disposition(it, ~0), it->d.lustre.it_status);
+                        it_disposition(it, ~0), it->it_status);
 
                rc = ll_local_open(file, it, fd, *och_p);
                if (rc)
@@ -664,7 +664,7 @@ out_openerr:
         }
 
        if (it && it_disposition(it, DISP_ENQ_OPEN_REF)) {
-               ptlrpc_req_finished(it->d.lustre.it_data);
+               ptlrpc_req_finished(it->it_data);
                it_clear_disposition(it, DISP_ENQ_OPEN_REF);
        }
 
@@ -799,12 +799,12 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode,
 
        /* already get lease, handle lease lock */
        ll_set_lock_data(sbi->ll_md_exp, inode, &it, NULL);
-       if (it.d.lustre.it_lock_mode == 0 ||
-           it.d.lustre.it_lock_bits != MDS_INODELOCK_OPEN) {
+       if (it.it_lock_mode == 0 ||
+           it.it_lock_bits != MDS_INODELOCK_OPEN) {
                /* open lock must return for lease */
                CERROR(DFID "lease granted but no open lock, %d/"LPU64".\n",
-                       PFID(ll_inode2fid(inode)), it.d.lustre.it_lock_mode,
-                       it.d.lustre.it_lock_bits);
+                       PFID(ll_inode2fid(inode)), it.it_lock_mode,
+                       it.it_lock_bits);
                GOTO(out_close, rc = -EPROTO);
        }
 
@@ -813,10 +813,10 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode,
 
 out_close:
        /* Cancel open lock */
-       if (it.d.lustre.it_lock_mode != 0) {
+       if (it.it_lock_mode != 0) {
                ldlm_lock_decref_and_cancel(&och->och_lease_handle,
-                                           it.d.lustre.it_lock_mode);
-               it.d.lustre.it_lock_mode = 0;
+                                           it.it_lock_mode);
+               it.it_lock_mode = 0;
                och->och_lease_handle.cookie = 0ULL;
        }
        rc2 = ll_close_inode_openhandle(inode, och, 0, NULL);
@@ -1746,7 +1746,7 @@ int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it)
 out:
        /* this one is in place of ll_file_open */
        if (it_disposition(it, DISP_ENQ_OPEN_REF)) {
-               ptlrpc_req_finished(it->d.lustre.it_data);
+               ptlrpc_req_finished(it->it_data);
                it_clear_disposition(it, DISP_ENQ_OPEN_REF);
        }
        RETURN(rc);
@@ -4119,14 +4119,14 @@ again:
                          PFID(&lli->lli_fid), inode);
 
        rc = md_enqueue(sbi->ll_md_exp, &einfo, NULL, &it, op_data, &lockh, 0);
-       if (it.d.lustre.it_data != NULL)
-               ptlrpc_req_finished(it.d.lustre.it_data);
-       it.d.lustre.it_data = NULL;
+       if (it.it_data != NULL)
+               ptlrpc_req_finished(it.it_data);
+       it.it_data = NULL;
 
        ll_finish_md_op_data(op_data);
 
-       mode = it.d.lustre.it_lock_mode;
-       it.d.lustre.it_lock_mode = 0;
+       mode = it.it_lock_mode;
+       it.it_lock_mode = 0;
        ll_intent_drop_lock(&it);
 
        if (rc == 0) {