aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/posix_acl.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2009-09-29 07:27:23 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2009-12-03 06:43:23 -0500
commit796bd9524731850967d437b7f47a86acc776ea89 (patch)
treeddaf9a4bd69e6178257b4a488b174301c4d3f045 /include/linux/posix_acl.h
parent2646a1f61a3b5525914757f10fa12b5b94713648 (diff)
VFS: Add forget_all_cached_acls()
This is required for cluster filesystems which want to use cached ACLs so that they can invalidate the cache when required. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Cc: Alexander Viro <aviro@redhat.com> Cc: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'include/linux/posix_acl.h')
-rw-r--r--include/linux/posix_acl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h
index 065a3652a3ea..67608161df6b 100644
--- a/include/linux/posix_acl.h
+++ b/include/linux/posix_acl.h
@@ -147,6 +147,20 @@ static inline void forget_cached_acl(struct inode *inode, int type)
147 if (old != ACL_NOT_CACHED) 147 if (old != ACL_NOT_CACHED)
148 posix_acl_release(old); 148 posix_acl_release(old);
149} 149}
150
151static inline void forget_all_cached_acls(struct inode *inode)
152{
153 struct posix_acl *old_access, *old_default;
154 spin_lock(&inode->i_lock);
155 old_access = inode->i_acl;
156 old_default = inode->i_default_acl;
157 inode->i_acl = inode->i_default_acl = ACL_NOT_CACHED;
158 spin_unlock(&inode->i_lock);
159 if (old_access != ACL_NOT_CACHED)
160 posix_acl_release(old_access);
161 if (old_default != ACL_NOT_CACHED)
162 posix_acl_release(old_default);
163}
150#endif 164#endif
151 165
152static inline void cache_no_acl(struct inode *inode) 166static inline void cache_no_acl(struct inode *inode)