1 ext4: merge ext4_xattr_list() into ext4_listxattr()
3 From: Eric Biggers <ebiggers@google.com>
5 There's no difference between ext4_xattr_list() and ext4_listxattr(), so
6 merge them together and just have ext4_listxattr(). Some years ago they
7 took different arguments, but that's no longer the case.
9 Signed-off-by: Eric Biggers <ebiggers@google.com>
10 Reviewed-by: Jan Kara <jack@suse.cz>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 fs/ext4/xattr.c | 21 +++++----------------
14 1 file changed, 5 insertions(+), 16 deletions(-)
16 diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
17 index a9ce2cf2ae69..8e9d0d4c6234 100644
20 @@ -78,8 +78,6 @@ static struct buffer_head *ext4_xattr_cache_find(struct inode *,
21 struct mb_cache_entry **);
22 static void ext4_xattr_rehash(struct ext4_xattr_header *,
23 struct ext4_xattr_entry *);
24 -static int ext4_xattr_list(struct dentry *dentry, char *buffer,
25 - size_t buffer_size);
27 static const struct xattr_handler * const ext4_xattr_handler_map[] = {
28 [EXT4_XATTR_INDEX_USER] = &ext4_xattr_user_handler,
29 @@ -163,17 +161,6 @@ ext4_xattr_handler(int name_index)
34 - * Inode operation listxattr()
36 - * d_inode(dentry)->i_mutex: don't care
39 -ext4_listxattr(struct dentry *dentry, char *buffer, size_t size)
41 - return ext4_xattr_list(dentry, buffer, size);
45 ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end,
47 @@ -519,7 +506,9 @@ ext4_xattr_ibody_list(struct dentry *dentry, char *buffer, size_t buffer_size)
52 + * Inode operation listxattr()
54 + * d_inode(dentry)->i_rwsem: don't care
56 * Copy a list of attribute names into the buffer
57 * provided, or compute the buffer size required.
58 @@ -528,8 +517,8 @@ ext4_xattr_ibody_list(struct dentry *dentry, char *buffer, size_t buffer_size)
59 * Returns a negative error number on failure, or the number of bytes
60 * used / required on success.
63 -ext4_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
65 +ext4_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)