mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
xattr: simplify listxattr helpers
The generic_listxattr() and simple_xattr_list() helpers list xattrs and contain duplicated code. Add two helpers that both generic_listxattr() and simple_xattr_list() can use. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner (Microsoft)
parent
fe15c26ee2
commit
f2620f166e
@@ -106,6 +106,8 @@ struct posix_acl *vfs_get_acl(struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, const char *acl_name);
|
||||
int vfs_remove_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
const char *acl_name);
|
||||
int posix_acl_listxattr(struct inode *inode, char **buffer,
|
||||
ssize_t *remaining_size);
|
||||
#else
|
||||
static inline int posix_acl_chmod(struct mnt_idmap *idmap,
|
||||
struct dentry *dentry, umode_t mode)
|
||||
@@ -153,6 +155,11 @@ static inline int vfs_remove_acl(struct mnt_idmap *idmap,
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
static inline int posix_acl_listxattr(struct inode *inode, char **buffer,
|
||||
ssize_t *remaining_size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_FS_POSIX_ACL */
|
||||
|
||||
struct posix_acl *get_inode_acl(struct inode *inode, int type);
|
||||
|
||||
Reference in New Issue
Block a user