summaryrefslogtreecommitdiff
path: root/include/linux/posix_acl.h
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2023-02-01 14:14:52 +0100
committerChristian Brauner (Microsoft) <brauner@kernel.org>2023-03-06 09:57:07 +0100
commitf2620f166e2a4db08f016b7b30b904ab28c265e4 (patch)
tree11a350c4f48ac673b05b1f3c4f5c14677575cf97 /include/linux/posix_acl.h
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff)
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>
Diffstat (limited to 'include/linux/posix_acl.h')
-rw-r--r--include/linux/posix_acl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h
index 21cc29b8a9e8..0e65b3d634d9 100644
--- a/include/linux/posix_acl.h
+++ b/include/linux/posix_acl.h
@@ -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);