* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#include <linux/module.h>
#include <linux/types.h>
#include <linux/version.h>
+#include <linux/user_namespace.h>
+#ifdef HAVE_UIDGID_HEADER
+# include <linux/uidgid.h>
+#endif
-#include <lustre_lite.h>
-#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;
OBD_SLAB_ALLOC_GFP(hash, ll_rmtperm_hash_cachep,
REMOTE_PERM_HASHSIZE * sizeof(*hash),
- GFP_IOFS);
+ GFP_NOFS);
if (!hash)
return NULL;
void free_rmtperm_hash(struct hlist_head *hash)
{
- int i;
- struct ll_remote_perm *lrp;
- struct hlist_node *node, *next;
+ int i;
+ struct ll_remote_perm *lrp;
+ struct hlist_node __maybe_unused *node;
+ struct hlist_node *next;
if(!hash)
return;
static int do_check_remote_perm(struct ll_inode_info *lli, int mask)
{
struct hlist_head *head;
- struct ll_remote_perm *lrp;
- struct hlist_node *node;
- int found = 0, rc;
- ENTRY;
+ struct ll_remote_perm *lrp;
+ struct hlist_node __maybe_unused *node;
+ int found = 0, rc;
+ ENTRY;
if (!lli->lli_remote_perms)
RETURN(-ENOENT);
int ll_update_remote_perm(struct inode *inode, struct mdt_remote_perm *perm)
{
- struct ll_inode_info *lli = ll_i2info(inode);
- struct ll_remote_perm *lrp = NULL, *tmp = NULL;
+ struct ll_inode_info *lli = ll_i2info(inode);
+ struct ll_remote_perm *lrp = NULL, *tmp = NULL;
struct hlist_head *head, *perm_hash = NULL;
- struct hlist_node *node;
- ENTRY;
+ struct hlist_node __maybe_unused *node;
+ ENTRY;
LASSERT(ll_i2sbi(inode)->ll_flags & LL_SBI_RMT_CLIENT);
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;
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;