-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2011, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Author: Huang Hua <huanghua@clusterfs.com>
*/
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
#define DEBUG_SUBSYSTEM S_MDS
#include <lustre_acl.h>
{
struct ptlrpc_request *req = mdt_info_req(info);
struct mdt_export_data *med = mdt_req2med(req);
- struct md_ucred *uc = mdt_ucred(info);
+ struct lu_ucred *uc = mdt_ucred(info);
struct mdt_body *reqbody;
struct mdt_body *repbody = NULL;
struct md_object *next;
if (reqbody == NULL)
RETURN(err_serious(-EFAULT));
- rc = mdt_init_ucred(info, reqbody);
+ rc = mdt_init_ucred(info, reqbody);
if (rc)
RETURN(err_serious(rc));
if (unlikely(!remote))
GOTO(out, rc = err_serious(-EINVAL));
- perm = mdt_identity_get_perm(uc->mu_identity, remote,
- req->rq_peer.nid);
+ perm = mdt_identity_get_perm(uc->uc_identity, remote,
+ req->rq_peer.nid);
if (!(perm & CFS_RMTACL_PERM))
GOTO(out, rc = err_serious(-EPERM));
EXIT;
out:
if (rc >= 0) {
- mdt_counter_incr(req->rq_export, LPROC_MDT_GETXATTR);
+ mdt_counter_incr(req, LPROC_MDT_GETXATTR);
repbody->eadatasize = rc;
rc = 0;
}
{
struct ptlrpc_request *req = mdt_info_req(info);
struct mdt_export_data *med = mdt_req2med(req);
- struct md_ucred *uc = mdt_ucred(info);
+ struct lu_ucred *uc = mdt_ucred(info);
struct lu_buf *buf = &info->mti_buf;
int rc;
ENTRY;
struct mdt_lock_handle *unused)
{
struct ptlrpc_request *req = mdt_info_req(info);
- struct md_ucred *uc = mdt_ucred(info);
+ struct lu_ucred *uc = mdt_ucred(info);
struct mdt_lock_handle *lh;
const struct lu_env *env = info->mti_env;
struct lu_buf *buf = &info->mti_buf;
CDEBUG(D_INODE, "%s xattr %s\n",
valid & OBD_MD_FLXATTR ? "set" : "remove", xattr_name);
- rc = mdt_init_ucred_reint(info);
+ rc = mdt_init_ucred_reint(info);
if (rc != 0)
RETURN(rc);
if (unlikely(!remote))
GOTO(out, rc = err_serious(-EINVAL));
- perm = mdt_identity_get_perm(uc->mu_identity, remote,
- req->rq_peer.nid);
+ perm = mdt_identity_get_perm(uc->uc_identity, remote,
+ req->rq_peer.nid);
if (!(perm & CFS_RMTACL_PERM))
GOTO(out, rc = err_serious(-EPERM));
}
rc = -EINVAL;
}
if (rc == 0)
- mdt_counter_incr(req->rq_export, LPROC_MDT_SETXATTR);
+ mdt_counter_incr(req, LPROC_MDT_SETXATTR);
EXIT;
out_unlock:
if (unlikely(new_xattr != NULL))
lustre_posix_acl_xattr_free(new_xattr, xattr_len);
out:
- mdt_exit_ucred(info);
- return rc;
+ mdt_exit_ucred(info);
+ return rc;
}