diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_acl.c | 11 | ||||
-rw-r--r-- | fs/xfs/xfs_acl.h | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_iget.c | 13 |
3 files changed, 22 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_acl.c b/fs/xfs/linux-2.6/xfs_acl.c index b2771862fd3d..39f4f809bb68 100644 --- a/fs/xfs/linux-2.6/xfs_acl.c +++ b/fs/xfs/linux-2.6/xfs_acl.c | |||
@@ -219,12 +219,13 @@ xfs_set_acl(struct inode *inode, int type, struct posix_acl *acl) | |||
219 | } | 219 | } |
220 | 220 | ||
221 | int | 221 | int |
222 | xfs_check_acl(struct inode *inode, int mask) | 222 | xfs_check_acl(struct inode *inode, int mask, unsigned int flags) |
223 | { | 223 | { |
224 | struct xfs_inode *ip = XFS_I(inode); | 224 | struct xfs_inode *ip; |
225 | struct posix_acl *acl; | 225 | struct posix_acl *acl; |
226 | int error = -EAGAIN; | 226 | int error = -EAGAIN; |
227 | 227 | ||
228 | ip = XFS_I(inode); | ||
228 | trace_xfs_check_acl(ip); | 229 | trace_xfs_check_acl(ip); |
229 | 230 | ||
230 | /* | 231 | /* |
@@ -234,6 +235,12 @@ xfs_check_acl(struct inode *inode, int mask) | |||
234 | if (!XFS_IFORK_Q(ip)) | 235 | if (!XFS_IFORK_Q(ip)) |
235 | return -EAGAIN; | 236 | return -EAGAIN; |
236 | 237 | ||
238 | if (flags & IPERM_FLAG_RCU) { | ||
239 | if (!negative_cached_acl(inode, ACL_TYPE_ACCESS)) | ||
240 | return -ECHILD; | ||
241 | return -EAGAIN; | ||
242 | } | ||
243 | |||
237 | acl = xfs_get_acl(inode, ACL_TYPE_ACCESS); | 244 | acl = xfs_get_acl(inode, ACL_TYPE_ACCESS); |
238 | if (IS_ERR(acl)) | 245 | if (IS_ERR(acl)) |
239 | return PTR_ERR(acl); | 246 | return PTR_ERR(acl); |
diff --git a/fs/xfs/xfs_acl.h b/fs/xfs/xfs_acl.h index 0135e2a669d7..11dd72070cbb 100644 --- a/fs/xfs/xfs_acl.h +++ b/fs/xfs/xfs_acl.h | |||
@@ -42,7 +42,7 @@ struct xfs_acl { | |||
42 | #define SGI_ACL_DEFAULT_SIZE (sizeof(SGI_ACL_DEFAULT)-1) | 42 | #define SGI_ACL_DEFAULT_SIZE (sizeof(SGI_ACL_DEFAULT)-1) |
43 | 43 | ||
44 | #ifdef CONFIG_XFS_POSIX_ACL | 44 | #ifdef CONFIG_XFS_POSIX_ACL |
45 | extern int xfs_check_acl(struct inode *inode, int mask); | 45 | extern int xfs_check_acl(struct inode *inode, int mask, unsigned int flags); |
46 | extern struct posix_acl *xfs_get_acl(struct inode *inode, int type); | 46 | extern struct posix_acl *xfs_get_acl(struct inode *inode, int type); |
47 | extern int xfs_inherit_acl(struct inode *inode, struct posix_acl *default_acl); | 47 | extern int xfs_inherit_acl(struct inode *inode, struct posix_acl *default_acl); |
48 | extern int xfs_acl_chmod(struct inode *inode); | 48 | extern int xfs_acl_chmod(struct inode *inode); |
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index 0cdd26932d8e..d7de5a3f7867 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -91,6 +91,17 @@ xfs_inode_alloc( | |||
91 | return ip; | 91 | return ip; |
92 | } | 92 | } |
93 | 93 | ||
94 | STATIC void | ||
95 | xfs_inode_free_callback( | ||
96 | struct rcu_head *head) | ||
97 | { | ||
98 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
99 | struct xfs_inode *ip = XFS_I(inode); | ||
100 | |||
101 | INIT_LIST_HEAD(&inode->i_dentry); | ||
102 | kmem_zone_free(xfs_inode_zone, ip); | ||
103 | } | ||
104 | |||
94 | void | 105 | void |
95 | xfs_inode_free( | 106 | xfs_inode_free( |
96 | struct xfs_inode *ip) | 107 | struct xfs_inode *ip) |
@@ -134,7 +145,7 @@ xfs_inode_free( | |||
134 | ASSERT(!spin_is_locked(&ip->i_flags_lock)); | 145 | ASSERT(!spin_is_locked(&ip->i_flags_lock)); |
135 | ASSERT(completion_done(&ip->i_flush)); | 146 | ASSERT(completion_done(&ip->i_flush)); |
136 | 147 | ||
137 | kmem_zone_free(xfs_inode_zone, ip); | 148 | call_rcu(&ip->i_vnode.i_rcu, xfs_inode_free_callback); |
138 | } | 149 | } |
139 | 150 | ||
140 | /* | 151 | /* |