Whamcloud - gitweb
(1) drop unnecessary ops.
authorfanyong <fanyong>
Sat, 7 Oct 2006 09:14:15 +0000 (09:14 +0000)
committerfanyong <fanyong>
Sat, 7 Oct 2006 09:14:15 +0000 (09:14 +0000)
(2) small fix for remote_perm.

lustre/mdt/mdt_handler.c
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_open.c

index 94f8790..ec78cc9 100644 (file)
@@ -959,10 +959,6 @@ static int mdt_readpage(struct mdt_thread_info *info)
         if (reqbody == NULL || repbody == NULL)
                 RETURN(err_serious(-EFAULT));
 
-        rc = mdt_init_ucred(info, reqbody);
-        if (rc)
-                RETURN(rc);
-
         /*
          * prepare @rdpg before calling lower layers and transfer itself. Here
          * reqbody->size contains offset of where to start to read and
@@ -972,13 +968,13 @@ static int mdt_readpage(struct mdt_thread_info *info)
         if ((__u64)rdpg->rp_hash != reqbody->size) {
                 CERROR("Invalid hash: %#llx != %#llx\n",
                        (__u64)rdpg->rp_hash, reqbody->size);
-                GOTO(out, rc = -EFAULT);
+                RETURN(-EFAULT);
         }
         rdpg->rp_count  = reqbody->nlink;
         rdpg->rp_npages = (rdpg->rp_count + CFS_PAGE_SIZE - 1)>>CFS_PAGE_SHIFT;
         OBD_ALLOC(rdpg->rp_pages, rdpg->rp_npages * sizeof rdpg->rp_pages[0]);
         if (rdpg->rp_pages == NULL)
-                GOTO(out, rc = -ENOMEM);
+                RETURN(-ENOMEM);
 
         for (i = 0; i < rdpg->rp_npages; ++i) {
                 rdpg->rp_pages[i] = alloc_pages(GFP_KERNEL, 0);
@@ -1006,11 +1002,8 @@ free_rdpg:
                         __free_pages(rdpg->rp_pages[i], 0);
         OBD_FREE(rdpg->rp_pages, rdpg->rp_npages * sizeof rdpg->rp_pages[0]);
 
-        mdt_exit_ucred(info);
         MDT_FAIL_RETURN(OBD_FAIL_MDS_SENDPAGE, 0);
 
-out:
-        mdt_exit_ucred(info);
         return rc ? rc : rc1;
 }
 
index f36ca46..233dac5 100644 (file)
@@ -615,8 +615,6 @@ static int mdt_setattr_unpack_rec(struct mdt_thread_info *info)
 
         uc->mu_fsuid = rec->sa_fsuid;
         uc->mu_fsgid = rec->sa_fsgid;
-        uc->mu_uid   = rec->sa_uid;
-        uc->mu_gid   = rec->sa_gid;
         uc->mu_cap   = rec->sa_cap;
         uc->mu_suppgids[0] = rec->sa_suppgid;
         uc->mu_suppgids[1] = -1;
index 6e7d31c..51c48c2 100644 (file)
@@ -316,7 +316,6 @@ static int mdt_mfd_open(struct mdt_thread_info *info,
         struct md_attr         *ma  = &info->mti_attr;
         struct lu_attr         *la  = &ma->ma_attr;
         struct mdt_file_data   *mfd;
-        const struct mdt_body  *reqbody = info->mti_body;
         struct mdt_body        *repbody;
         int                     rc = 0;
         int                     isreg, isdir, islnk;
@@ -333,7 +332,7 @@ static int mdt_mfd_open(struct mdt_thread_info *info,
         mdt_pack_attr2body(repbody, la, mdt_object_fid(o));
         mdt_body_reverse_idmap(info, repbody);
 
-        if (med->med_rmtclient && (reqbody->valid & OBD_MD_FLRMTPERM)) {
+        if (med->med_rmtclient) {
                 void *buf = req_capsule_server_get(&info->mti_pill, &RMF_ACL);
 
                 rc = mdt_pack_remote_perm(info, o, buf);