diff options
author | Christoph Hellwig <hch@infradead.org> | 2013-12-20 17:16:53 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-01-26 17:26:20 +0400 |
commit | 013cdf1088d7235da9477a2375654921d9b9ba9f (patch) | |
tree | 56a89d0a58282c517f6c5a8e68e3d341184e40d1 /include/linux | |
parent | e01580bf9e4d0e3bbaead44bd46cdbfe61957732 (diff) | |
download | linux-013cdf1088d7235da9477a2375654921d9b9ba9f.tar.xz |
nfs: use generic posix ACL infrastructure for v3 Posix ACLs
This causes a small behaviour change in that we don't bother to set
ACLs on file creation if the mode bit can express the access permissions
fully, and thus behaving identical to local filesystems.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/nfs_fs.h | 24 | ||||
-rw-r--r-- | include/linux/posix_acl.h | 4 |
2 files changed, 11 insertions, 17 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 48997374eaf0..2b00625952a7 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -154,10 +154,6 @@ struct nfs_inode { struct rb_root access_cache; struct list_head access_cache_entry_lru; struct list_head access_cache_inode_lru; -#ifdef CONFIG_NFS_V3_ACL - struct posix_acl *acl_access; - struct posix_acl *acl_default; -#endif /* * This is the cookie verifier used for NFSv3 readdir @@ -564,23 +560,17 @@ extern int nfs_readpage_async(struct nfs_open_context *, struct inode *, * linux/fs/nfs3proc.c */ #ifdef CONFIG_NFS_V3_ACL -extern struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type); -extern int nfs3_proc_setacl(struct inode *inode, int type, - struct posix_acl *acl); -extern int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode, - umode_t mode); -extern void nfs3_forget_cached_acls(struct inode *inode); +extern struct posix_acl *nfs3_get_acl(struct inode *inode, int type); +extern int nfs3_set_acl(struct inode *inode, struct posix_acl *acl, int type); +extern int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, + struct posix_acl *dfacl); +extern const struct xattr_handler *nfs3_xattr_handlers[]; #else -static inline int nfs3_proc_set_default_acl(struct inode *dir, - struct inode *inode, - umode_t mode) +static inline int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl, + struct posix_acl *dfacl) { return 0; } - -static inline void nfs3_forget_cached_acls(struct inode *inode) -{ -} #endif /* CONFIG_NFS_V3_ACL */ /* diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index f7e6f6cb214a..3d14be8e14db 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h @@ -191,6 +191,10 @@ static inline int posix_acl_create(struct inode *inode, umode_t *mode, *default_acl = *acl = NULL; return 0; } + +static inline void forget_all_cached_acls(struct inode *inode) +{ +} #endif /* CONFIG_FS_POSIX_ACL */ struct posix_acl *get_acl(struct inode *inode, int type); |