Whamcloud - gitweb
LU-8091 mount: error out properly in server_lsi2mti()
[fs/lustre-release.git] / lustre / llite / remote_perm.c
index 2789412..c708b00 100644 (file)
 # include <linux/uidgid.h>
 #endif
 
-#include <lustre_ha.h>
 #include <lustre_dlm.h>
+#include <lustre_ha.h>
+#include <lustre_param.h>
+#include <lustre_swab.h>
 #include <lprocfs_status.h>
 #include <lustre_disk.h>
-#include <lustre_param.h>
+
 #include "llite_internal.h"
 
 struct kmem_cache *ll_remote_perm_cachep;
@@ -88,7 +90,7 @@ static struct hlist_head *alloc_rmtperm_hash(void)
 
        OBD_SLAB_ALLOC_GFP(hash, ll_rmtperm_hash_cachep,
                           REMOTE_PERM_HASHSIZE * sizeof(*hash),
-                          GFP_IOFS);
+                          GFP_NOFS);
         if (!hash)
                 return NULL;
 
@@ -257,7 +259,6 @@ int lustre_check_remote_perm(struct inode *inode, int mask)
         struct ll_sb_info *sbi = ll_i2sbi(inode);
         struct ptlrpc_request *req = NULL;
         struct mdt_remote_perm *perm;
-        struct obd_capa *oc;
         cfs_time_t save;
         int i = 0, rc;
         ENTRY;
@@ -285,10 +286,8 @@ int lustre_check_remote_perm(struct inode *inode, int mask)
                         LBUG();
                 }
 
-                oc = ll_mdscapa_get(inode);
-                rc = md_get_remote_perm(sbi->ll_md_exp, ll_inode2fid(inode), oc,
-                                        ll_i2suppgid(inode), &req);
-                capa_put(oc);
+               rc = md_get_remote_perm(sbi->ll_md_exp, ll_inode2fid(inode),
+                                       ll_i2suppgid(inode), &req);
                 if (rc) {
                        mutex_unlock(&lli->lli_rmtperm_mutex);
                         break;