diff options
author | Christoph Hellwig <hch@infradead.org> | 2008-02-04 20:13:24 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-07 02:22:38 -0500 |
commit | 4576758db5817a91b8974c696247d459dc653db2 (patch) | |
tree | 43b5b471510f0981ea2dc668ca7591a75831f111 /fs/xfs/linux-2.6/xfs_iops.c | |
parent | f6aa7f2184330262e1cb5f7802536e5346bd46a3 (diff) |
[XFS] use generic_permission
Now that all direct caller of xfs_iaccess are gone we can kill xfs_iaccess
and xfs_access and just use generic_permission with a check_acl callback.
This is required for the per-mount read-only patchset in -mm to work
properly with XFS.
SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30370a
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_iops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 1ecd86a8c6e6..c3231a519361 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -559,12 +559,31 @@ xfs_vn_put_link( | |||
559 | 559 | ||
560 | #ifdef CONFIG_XFS_POSIX_ACL | 560 | #ifdef CONFIG_XFS_POSIX_ACL |
561 | STATIC int | 561 | STATIC int |
562 | xfs_check_acl( | ||
563 | struct inode *inode, | ||
564 | int mask) | ||
565 | { | ||
566 | struct xfs_inode *ip = XFS_I(inode); | ||
567 | int error; | ||
568 | |||
569 | xfs_itrace_entry(ip); | ||
570 | |||
571 | if (XFS_IFORK_Q(ip)) { | ||
572 | error = xfs_acl_iaccess(ip, mask, NULL); | ||
573 | if (error != -1) | ||
574 | return -error; | ||
575 | } | ||
576 | |||
577 | return -EAGAIN; | ||
578 | } | ||
579 | |||
580 | STATIC int | ||
562 | xfs_vn_permission( | 581 | xfs_vn_permission( |
563 | struct inode *inode, | 582 | struct inode *inode, |
564 | int mode, | 583 | int mask, |
565 | struct nameidata *nd) | 584 | struct nameidata *nd) |
566 | { | 585 | { |
567 | return -xfs_access(XFS_I(inode), mode << 6, NULL); | 586 | return generic_permission(inode, mask, xfs_check_acl); |
568 | } | 587 | } |
569 | #else | 588 | #else |
570 | #define xfs_vn_permission NULL | 589 | #define xfs_vn_permission NULL |