aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_acl.c
diff options
context:
space:
mode:
authorDavid Chinner <david@fromorbit.com>2008-08-13 02:01:45 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-08-13 02:01:45 -0400
commite6064d30c3407db7f8c19d5538ec847b29e47e30 (patch)
tree0717b05a9a937e707c99309be8264b22546e4a44 /fs/xfs/xfs_acl.c
parente4f7529108d01bf66af8ebecd6be2b98d8db30ce (diff)
[XFS] XFS: Kill xfs_vtoi()
xfs_vtoi() is redundant and only unsed in small sections of code. Replace them with widely used XFS_I() inline and kill xfs_vtoi(). SGI-PV: 981498 SGI-Modid: xfs-linux-melb:xfs-kern:31725a Signed-off-by: David Chinner <david@fromorbit.com> Signed-off-by: Niv Sardi <xaiki@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_acl.c')
-rw-r--r--fs/xfs/xfs_acl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index 3e4648ad9cfc..fdeca54540a5 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
@@ -239,7 +239,7 @@ xfs_acl_vget(
239 goto out; 239 goto out;
240 } 240 }
241 if (kind == _ACL_TYPE_ACCESS) 241 if (kind == _ACL_TYPE_ACCESS)
242 xfs_acl_sync_mode(xfs_vtoi(vp)->i_d.di_mode, xfs_acl); 242 xfs_acl_sync_mode(XFS_I(vp)->i_d.di_mode, xfs_acl);
243 error = -posix_acl_xfs_to_xattr(xfs_acl, ext_acl, size); 243 error = -posix_acl_xfs_to_xattr(xfs_acl, ext_acl, size);
244 } 244 }
245out: 245out:
@@ -259,7 +259,7 @@ xfs_acl_vremove(
259 VN_HOLD(vp); 259 VN_HOLD(vp);
260 error = xfs_acl_allow_set(vp, kind); 260 error = xfs_acl_allow_set(vp, kind);
261 if (!error) { 261 if (!error) {
262 error = xfs_attr_remove(xfs_vtoi(vp), 262 error = xfs_attr_remove(XFS_I(vp),
263 kind == _ACL_TYPE_DEFAULT? 263 kind == _ACL_TYPE_DEFAULT?
264 SGI_ACL_DEFAULT: SGI_ACL_FILE, 264 SGI_ACL_DEFAULT: SGI_ACL_FILE,
265 ATTR_ROOT); 265 ATTR_ROOT);
@@ -372,7 +372,7 @@ xfs_acl_allow_set(
372 return ENOTDIR; 372 return ENOTDIR;
373 if (vp->i_sb->s_flags & MS_RDONLY) 373 if (vp->i_sb->s_flags & MS_RDONLY)
374 return EROFS; 374 return EROFS;
375 if (xfs_vtoi(vp)->i_d.di_uid != current->fsuid && !capable(CAP_FOWNER)) 375 if (XFS_I(vp)->i_d.di_uid != current->fsuid && !capable(CAP_FOWNER))
376 return EPERM; 376 return EPERM;
377 return 0; 377 return 0;
378} 378}
@@ -576,7 +576,7 @@ xfs_acl_get_attr(
576 576
577 ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1); 577 ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1);
578 flags |= ATTR_ROOT; 578 flags |= ATTR_ROOT;
579 *error = xfs_attr_get(xfs_vtoi(vp), 579 *error = xfs_attr_get(XFS_I(vp),
580 kind == _ACL_TYPE_ACCESS ? 580 kind == _ACL_TYPE_ACCESS ?
581 SGI_ACL_FILE : SGI_ACL_DEFAULT, 581 SGI_ACL_FILE : SGI_ACL_DEFAULT,
582 (char *)aclp, &len, flags); 582 (char *)aclp, &len, flags);
@@ -615,7 +615,7 @@ xfs_acl_set_attr(
615 INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm); 615 INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm);
616 } 616 }
617 INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt); 617 INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt);
618 *error = xfs_attr_set(xfs_vtoi(vp), 618 *error = xfs_attr_set(XFS_I(vp),
619 kind == _ACL_TYPE_ACCESS ? 619 kind == _ACL_TYPE_ACCESS ?
620 SGI_ACL_FILE: SGI_ACL_DEFAULT, 620 SGI_ACL_FILE: SGI_ACL_DEFAULT,
621 (char *)newacl, len, ATTR_ROOT); 621 (char *)newacl, len, ATTR_ROOT);
@@ -639,7 +639,7 @@ xfs_acl_vtoacl(
639 if (error) 639 if (error)
640 access_acl->acl_cnt = XFS_ACL_NOT_PRESENT; 640 access_acl->acl_cnt = XFS_ACL_NOT_PRESENT;
641 else /* We have a good ACL and the file mode, synchronize. */ 641 else /* We have a good ACL and the file mode, synchronize. */
642 xfs_acl_sync_mode(xfs_vtoi(vp)->i_d.di_mode, access_acl); 642 xfs_acl_sync_mode(XFS_I(vp)->i_d.di_mode, access_acl);
643 } 643 }
644 644
645 if (default_acl) { 645 if (default_acl) {
@@ -734,7 +734,7 @@ xfs_acl_setmode(
734 * mode. The m:: bits take precedence over the g:: bits. 734 * mode. The m:: bits take precedence over the g:: bits.
735 */ 735 */
736 iattr.ia_valid = ATTR_MODE; 736 iattr.ia_valid = ATTR_MODE;
737 iattr.ia_mode = xfs_vtoi(vp)->i_d.di_mode; 737 iattr.ia_mode = XFS_I(vp)->i_d.di_mode;
738 iattr.ia_mode &= ~(S_IRWXU|S_IRWXG|S_IRWXO); 738 iattr.ia_mode &= ~(S_IRWXU|S_IRWXG|S_IRWXO);
739 ap = acl->acl_entry; 739 ap = acl->acl_entry;
740 for (i = 0; i < acl->acl_cnt; ++i) { 740 for (i = 0; i < acl->acl_cnt; ++i) {
@@ -764,7 +764,7 @@ xfs_acl_setmode(
764 if (gap && nomask) 764 if (gap && nomask)
765 iattr.ia_mode |= gap->ae_perm << 3; 765 iattr.ia_mode |= gap->ae_perm << 3;
766 766
767 return xfs_setattr(xfs_vtoi(vp), &iattr, 0, sys_cred); 767 return xfs_setattr(XFS_I(vp), &iattr, 0, sys_cred);
768} 768}
769 769
770/* 770/*