summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_acl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-29 10:58:01 +1000
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-16 10:40:00 +1000
commit739bfb2a7dfa369324f74aad1d020d6e0775e4f0 (patch)
tree8fbe3e739e0d550137e3f148a36ce5c083f5ef2c /fs/xfs/xfs_acl.c
parent993386c19afa53fa54d00c7721e56ba820b3400d (diff)
downloadop-kernel-dev-739bfb2a7dfa369324f74aad1d020d6e0775e4f0.zip
op-kernel-dev-739bfb2a7dfa369324f74aad1d020d6e0775e4f0.tar.gz
[XFS] call common xfs vnode-level helpers directly and remove vnode operations
SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29493a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_acl.c')
-rw-r--r--fs/xfs/xfs_acl.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index 4ca4beb..034c5ea 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
@@ -32,6 +32,7 @@
#include "xfs_btree.h"
#include "xfs_acl.h"
#include "xfs_attr.h"
+#include "xfs_vnodeops.h"
#include <linux/capability.h>
#include <linux/posix_acl_xattr.h>
@@ -241,7 +242,7 @@ xfs_acl_vget(
bhv_vattr_t va;
va.va_mask = XFS_AT_MODE;
- error = bhv_vop_getattr(vp, &va, 0, sys_cred);
+ error = xfs_getattr(xfs_vtoi(vp), &va, 0);
if (error)
goto out;
xfs_acl_sync_mode(va.va_mode, xfs_acl);
@@ -265,9 +266,10 @@ xfs_acl_vremove(
VN_HOLD(vp);
error = xfs_acl_allow_set(vp, kind);
if (!error) {
- error = bhv_vop_attr_remove(vp, kind == _ACL_TYPE_DEFAULT?
+ error = xfs_attr_remove(xfs_vtoi(vp),
+ kind == _ACL_TYPE_DEFAULT?
SGI_ACL_DEFAULT: SGI_ACL_FILE,
- ATTR_ROOT, sys_cred);
+ ATTR_ROOT);
if (error == ENOATTR)
error = 0; /* 'scool */
}
@@ -380,7 +382,7 @@ xfs_acl_allow_set(
if (vp->v_vfsp->vfs_flag & VFS_RDONLY)
return EROFS;
va.va_mask = XFS_AT_UID;
- error = bhv_vop_getattr(vp, &va, 0, NULL);
+ error = xfs_getattr(xfs_vtoi(vp), &va, 0);
if (error)
return error;
if (va.va_uid != current->fsuid && !capable(CAP_FOWNER))
@@ -613,7 +615,8 @@ xfs_acl_get_attr(
ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1);
flags |= ATTR_ROOT;
- *error = bhv_vop_attr_get(vp, kind == _ACL_TYPE_ACCESS ?
+ *error = xfs_attr_get(xfs_vtoi(vp),
+ kind == _ACL_TYPE_ACCESS ?
SGI_ACL_FILE : SGI_ACL_DEFAULT,
(char *)aclp, &len, flags, sys_cred);
if (*error || (flags & ATTR_KERNOVAL))
@@ -651,9 +654,10 @@ xfs_acl_set_attr(
INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm);
}
INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt);
- *error = bhv_vop_attr_set(vp, kind == _ACL_TYPE_ACCESS ?
+ *error = xfs_attr_set(xfs_vtoi(vp),
+ kind == _ACL_TYPE_ACCESS ?
SGI_ACL_FILE: SGI_ACL_DEFAULT,
- (char *)newacl, len, ATTR_ROOT, sys_cred);
+ (char *)newacl, len, ATTR_ROOT);
_ACL_FREE(newacl);
}
@@ -675,7 +679,7 @@ xfs_acl_vtoacl(
if (!error) {
/* Got the ACL, need the mode... */
va.va_mask = XFS_AT_MODE;
- error = bhv_vop_getattr(vp, &va, 0, sys_cred);
+ error = xfs_getattr(xfs_vtoi(vp), &va, 0);
}
if (error)
@@ -773,7 +777,7 @@ xfs_acl_setmode(
* mode. The m:: bits take precedence over the g:: bits.
*/
va.va_mask = XFS_AT_MODE;
- error = bhv_vop_getattr(vp, &va, 0, sys_cred);
+ error = xfs_getattr(xfs_vtoi(vp), &va, 0);
if (error)
return error;
@@ -807,7 +811,7 @@ xfs_acl_setmode(
if (gap && nomask)
va.va_mode |= gap->ae_perm << 3;
- return bhv_vop_setattr(vp, &va, 0, sys_cred);
+ return xfs_setattr(xfs_vtoi(vp), &va, 0, sys_cred);
}
/*
OpenPOWER on IntegriCloud