diff options
author | Nathan Scott <nathans@sgi.com> | 2006-06-09 03:00:52 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-06-09 03:00:52 -0400 |
commit | 67fcaa73adafb19139a7cd8ab133592b6a0a0901 (patch) | |
tree | 6e7b83e7c8b0a1d8b4776af1537d6f07ebe9435d /fs/xfs/xfs_acl.c | |
parent | b83bd1388133e914c38bd31d69bc90143e6ab10c (diff) |
[XFS] Resolve a namespace collision on vnode/vnodeops for FreeBSD porters.
SGI-PV: 953338
SGI-Modid: xfs-linux-melb:xfs-kern:26107a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_acl.c')
-rw-r--r-- | fs/xfs/xfs_acl.c | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 2539af34eb63..8c300da4e7ab 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c | |||
@@ -39,15 +39,15 @@ | |||
39 | #include <linux/capability.h> | 39 | #include <linux/capability.h> |
40 | #include <linux/posix_acl_xattr.h> | 40 | #include <linux/posix_acl_xattr.h> |
41 | 41 | ||
42 | STATIC int xfs_acl_setmode(vnode_t *, xfs_acl_t *, int *); | 42 | STATIC int xfs_acl_setmode(bhv_vnode_t *, xfs_acl_t *, int *); |
43 | STATIC void xfs_acl_filter_mode(mode_t, xfs_acl_t *); | 43 | STATIC void xfs_acl_filter_mode(mode_t, xfs_acl_t *); |
44 | STATIC void xfs_acl_get_endian(xfs_acl_t *); | 44 | STATIC void xfs_acl_get_endian(xfs_acl_t *); |
45 | STATIC int xfs_acl_access(uid_t, gid_t, xfs_acl_t *, mode_t, cred_t *); | 45 | STATIC int xfs_acl_access(uid_t, gid_t, xfs_acl_t *, mode_t, cred_t *); |
46 | STATIC int xfs_acl_invalid(xfs_acl_t *); | 46 | STATIC int xfs_acl_invalid(xfs_acl_t *); |
47 | STATIC void xfs_acl_sync_mode(mode_t, xfs_acl_t *); | 47 | STATIC void xfs_acl_sync_mode(mode_t, xfs_acl_t *); |
48 | STATIC void xfs_acl_get_attr(vnode_t *, xfs_acl_t *, int, int, int *); | 48 | STATIC void xfs_acl_get_attr(bhv_vnode_t *, xfs_acl_t *, int, int, int *); |
49 | STATIC void xfs_acl_set_attr(vnode_t *, xfs_acl_t *, int, int *); | 49 | STATIC void xfs_acl_set_attr(bhv_vnode_t *, xfs_acl_t *, int, int *); |
50 | STATIC int xfs_acl_allow_set(vnode_t *, int); | 50 | STATIC int xfs_acl_allow_set(bhv_vnode_t *, int); |
51 | 51 | ||
52 | kmem_zone_t *xfs_acl_zone; | 52 | kmem_zone_t *xfs_acl_zone; |
53 | 53 | ||
@@ -57,7 +57,7 @@ kmem_zone_t *xfs_acl_zone; | |||
57 | */ | 57 | */ |
58 | int | 58 | int |
59 | xfs_acl_vhasacl_access( | 59 | xfs_acl_vhasacl_access( |
60 | vnode_t *vp) | 60 | bhv_vnode_t *vp) |
61 | { | 61 | { |
62 | int error; | 62 | int error; |
63 | 63 | ||
@@ -70,7 +70,7 @@ xfs_acl_vhasacl_access( | |||
70 | */ | 70 | */ |
71 | int | 71 | int |
72 | xfs_acl_vhasacl_default( | 72 | xfs_acl_vhasacl_default( |
73 | vnode_t *vp) | 73 | bhv_vnode_t *vp) |
74 | { | 74 | { |
75 | int error; | 75 | int error; |
76 | 76 | ||
@@ -209,7 +209,7 @@ posix_acl_xfs_to_xattr( | |||
209 | 209 | ||
210 | int | 210 | int |
211 | xfs_acl_vget( | 211 | xfs_acl_vget( |
212 | vnode_t *vp, | 212 | bhv_vnode_t *vp, |
213 | void *acl, | 213 | void *acl, |
214 | size_t size, | 214 | size_t size, |
215 | int kind) | 215 | int kind) |
@@ -244,7 +244,7 @@ xfs_acl_vget( | |||
244 | vattr_t va; | 244 | vattr_t va; |
245 | 245 | ||
246 | va.va_mask = XFS_AT_MODE; | 246 | va.va_mask = XFS_AT_MODE; |
247 | VOP_GETATTR(vp, &va, 0, sys_cred, error); | 247 | error = bhv_vop_getattr(vp, &va, 0, sys_cred); |
248 | if (error) | 248 | if (error) |
249 | goto out; | 249 | goto out; |
250 | xfs_acl_sync_mode(va.va_mode, xfs_acl); | 250 | xfs_acl_sync_mode(va.va_mode, xfs_acl); |
@@ -260,7 +260,7 @@ out: | |||
260 | 260 | ||
261 | int | 261 | int |
262 | xfs_acl_vremove( | 262 | xfs_acl_vremove( |
263 | vnode_t *vp, | 263 | bhv_vnode_t *vp, |
264 | int kind) | 264 | int kind) |
265 | { | 265 | { |
266 | int error; | 266 | int error; |
@@ -268,9 +268,9 @@ xfs_acl_vremove( | |||
268 | VN_HOLD(vp); | 268 | VN_HOLD(vp); |
269 | error = xfs_acl_allow_set(vp, kind); | 269 | error = xfs_acl_allow_set(vp, kind); |
270 | if (!error) { | 270 | if (!error) { |
271 | VOP_ATTR_REMOVE(vp, kind == _ACL_TYPE_DEFAULT? | 271 | error = bhv_vop_attr_remove(vp, kind == _ACL_TYPE_DEFAULT? |
272 | SGI_ACL_DEFAULT: SGI_ACL_FILE, | 272 | SGI_ACL_DEFAULT: SGI_ACL_FILE, |
273 | ATTR_ROOT, sys_cred, error); | 273 | ATTR_ROOT, sys_cred); |
274 | if (error == ENOATTR) | 274 | if (error == ENOATTR) |
275 | error = 0; /* 'scool */ | 275 | error = 0; /* 'scool */ |
276 | } | 276 | } |
@@ -280,7 +280,7 @@ xfs_acl_vremove( | |||
280 | 280 | ||
281 | int | 281 | int |
282 | xfs_acl_vset( | 282 | xfs_acl_vset( |
283 | vnode_t *vp, | 283 | bhv_vnode_t *vp, |
284 | void *acl, | 284 | void *acl, |
285 | size_t size, | 285 | size_t size, |
286 | int kind) | 286 | int kind) |
@@ -370,7 +370,7 @@ xfs_acl_iaccess( | |||
370 | 370 | ||
371 | STATIC int | 371 | STATIC int |
372 | xfs_acl_allow_set( | 372 | xfs_acl_allow_set( |
373 | vnode_t *vp, | 373 | bhv_vnode_t *vp, |
374 | int kind) | 374 | int kind) |
375 | { | 375 | { |
376 | vattr_t va; | 376 | vattr_t va; |
@@ -383,7 +383,7 @@ xfs_acl_allow_set( | |||
383 | if (vp->v_vfsp->vfs_flag & VFS_RDONLY) | 383 | if (vp->v_vfsp->vfs_flag & VFS_RDONLY) |
384 | return EROFS; | 384 | return EROFS; |
385 | va.va_mask = XFS_AT_UID; | 385 | va.va_mask = XFS_AT_UID; |
386 | VOP_GETATTR(vp, &va, 0, NULL, error); | 386 | error = bhv_vop_getattr(vp, &va, 0, NULL); |
387 | if (error) | 387 | if (error) |
388 | return error; | 388 | return error; |
389 | if (va.va_uid != current->fsuid && !capable(CAP_FOWNER)) | 389 | if (va.va_uid != current->fsuid && !capable(CAP_FOWNER)) |
@@ -606,7 +606,7 @@ xfs_acl_get_endian( | |||
606 | */ | 606 | */ |
607 | STATIC void | 607 | STATIC void |
608 | xfs_acl_get_attr( | 608 | xfs_acl_get_attr( |
609 | vnode_t *vp, | 609 | bhv_vnode_t *vp, |
610 | xfs_acl_t *aclp, | 610 | xfs_acl_t *aclp, |
611 | int kind, | 611 | int kind, |
612 | int flags, | 612 | int flags, |
@@ -616,9 +616,9 @@ xfs_acl_get_attr( | |||
616 | 616 | ||
617 | ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1); | 617 | ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1); |
618 | flags |= ATTR_ROOT; | 618 | flags |= ATTR_ROOT; |
619 | VOP_ATTR_GET(vp, | 619 | *error = bhv_vop_attr_get(vp, kind == _ACL_TYPE_ACCESS ? |
620 | kind == _ACL_TYPE_ACCESS ? SGI_ACL_FILE : SGI_ACL_DEFAULT, | 620 | SGI_ACL_FILE : SGI_ACL_DEFAULT, |
621 | (char *)aclp, &len, flags, sys_cred, *error); | 621 | (char *)aclp, &len, flags, sys_cred); |
622 | if (*error || (flags & ATTR_KERNOVAL)) | 622 | if (*error || (flags & ATTR_KERNOVAL)) |
623 | return; | 623 | return; |
624 | xfs_acl_get_endian(aclp); | 624 | xfs_acl_get_endian(aclp); |
@@ -629,7 +629,7 @@ xfs_acl_get_attr( | |||
629 | */ | 629 | */ |
630 | STATIC void | 630 | STATIC void |
631 | xfs_acl_set_attr( | 631 | xfs_acl_set_attr( |
632 | vnode_t *vp, | 632 | bhv_vnode_t *vp, |
633 | xfs_acl_t *aclp, | 633 | xfs_acl_t *aclp, |
634 | int kind, | 634 | int kind, |
635 | int *error) | 635 | int *error) |
@@ -654,15 +654,15 @@ xfs_acl_set_attr( | |||
654 | INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm); | 654 | INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm); |
655 | } | 655 | } |
656 | INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt); | 656 | INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt); |
657 | VOP_ATTR_SET(vp, | 657 | *error = bhv_vop_attr_set(vp, kind == _ACL_TYPE_ACCESS ? |
658 | kind == _ACL_TYPE_ACCESS ? SGI_ACL_FILE: SGI_ACL_DEFAULT, | 658 | SGI_ACL_FILE: SGI_ACL_DEFAULT, |
659 | (char *)newacl, len, ATTR_ROOT, sys_cred, *error); | 659 | (char *)newacl, len, ATTR_ROOT, sys_cred); |
660 | _ACL_FREE(newacl); | 660 | _ACL_FREE(newacl); |
661 | } | 661 | } |
662 | 662 | ||
663 | int | 663 | int |
664 | xfs_acl_vtoacl( | 664 | xfs_acl_vtoacl( |
665 | vnode_t *vp, | 665 | bhv_vnode_t *vp, |
666 | xfs_acl_t *access_acl, | 666 | xfs_acl_t *access_acl, |
667 | xfs_acl_t *default_acl) | 667 | xfs_acl_t *default_acl) |
668 | { | 668 | { |
@@ -678,7 +678,7 @@ xfs_acl_vtoacl( | |||
678 | if (!error) { | 678 | if (!error) { |
679 | /* Got the ACL, need the mode... */ | 679 | /* Got the ACL, need the mode... */ |
680 | va.va_mask = XFS_AT_MODE; | 680 | va.va_mask = XFS_AT_MODE; |
681 | VOP_GETATTR(vp, &va, 0, sys_cred, error); | 681 | error = bhv_vop_getattr(vp, &va, 0, sys_cred); |
682 | } | 682 | } |
683 | 683 | ||
684 | if (error) | 684 | if (error) |
@@ -701,7 +701,7 @@ xfs_acl_vtoacl( | |||
701 | */ | 701 | */ |
702 | int | 702 | int |
703 | xfs_acl_inherit( | 703 | xfs_acl_inherit( |
704 | vnode_t *vp, | 704 | bhv_vnode_t *vp, |
705 | vattr_t *vap, | 705 | vattr_t *vap, |
706 | xfs_acl_t *pdaclp) | 706 | xfs_acl_t *pdaclp) |
707 | { | 707 | { |
@@ -757,7 +757,7 @@ xfs_acl_inherit( | |||
757 | */ | 757 | */ |
758 | STATIC int | 758 | STATIC int |
759 | xfs_acl_setmode( | 759 | xfs_acl_setmode( |
760 | vnode_t *vp, | 760 | bhv_vnode_t *vp, |
761 | xfs_acl_t *acl, | 761 | xfs_acl_t *acl, |
762 | int *basicperms) | 762 | int *basicperms) |
763 | { | 763 | { |
@@ -776,7 +776,7 @@ xfs_acl_setmode( | |||
776 | * mode. The m:: bits take precedence over the g:: bits. | 776 | * mode. The m:: bits take precedence over the g:: bits. |
777 | */ | 777 | */ |
778 | va.va_mask = XFS_AT_MODE; | 778 | va.va_mask = XFS_AT_MODE; |
779 | VOP_GETATTR(vp, &va, 0, sys_cred, error); | 779 | error = bhv_vop_getattr(vp, &va, 0, sys_cred); |
780 | if (error) | 780 | if (error) |
781 | return error; | 781 | return error; |
782 | 782 | ||
@@ -810,8 +810,7 @@ xfs_acl_setmode( | |||
810 | if (gap && nomask) | 810 | if (gap && nomask) |
811 | va.va_mode |= gap->ae_perm << 3; | 811 | va.va_mode |= gap->ae_perm << 3; |
812 | 812 | ||
813 | VOP_SETATTR(vp, &va, 0, sys_cred, error); | 813 | return bhv_vop_setattr(vp, &va, 0, sys_cred); |
814 | return error; | ||
815 | } | 814 | } |
816 | 815 | ||
817 | /* | 816 | /* |