mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
ext4: merge ext4_xattr_list() into ext4_listxattr()
There's no difference between ext4_xattr_list() and ext4_listxattr(), so merge them together and just have ext4_listxattr(). Some years ago they took different arguments, but that's no longer the case. Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
d600618673
commit
ba7ea1d8f4
@ -78,8 +78,6 @@ static struct buffer_head *ext4_xattr_cache_find(struct inode *,
|
|||||||
struct mb_cache_entry **);
|
struct mb_cache_entry **);
|
||||||
static void ext4_xattr_rehash(struct ext4_xattr_header *,
|
static void ext4_xattr_rehash(struct ext4_xattr_header *,
|
||||||
struct ext4_xattr_entry *);
|
struct ext4_xattr_entry *);
|
||||||
static int ext4_xattr_list(struct dentry *dentry, char *buffer,
|
|
||||||
size_t buffer_size);
|
|
||||||
|
|
||||||
static const struct xattr_handler * const ext4_xattr_handler_map[] = {
|
static const struct xattr_handler * const ext4_xattr_handler_map[] = {
|
||||||
[EXT4_XATTR_INDEX_USER] = &ext4_xattr_user_handler,
|
[EXT4_XATTR_INDEX_USER] = &ext4_xattr_user_handler,
|
||||||
@ -163,17 +161,6 @@ ext4_xattr_handler(int name_index)
|
|||||||
return handler;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Inode operation listxattr()
|
|
||||||
*
|
|
||||||
* d_inode(dentry)->i_mutex: don't care
|
|
||||||
*/
|
|
||||||
ssize_t
|
|
||||||
ext4_listxattr(struct dentry *dentry, char *buffer, size_t size)
|
|
||||||
{
|
|
||||||
return ext4_xattr_list(dentry, buffer, size);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end,
|
ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end,
|
||||||
void *value_start)
|
void *value_start)
|
||||||
@ -519,7 +506,9 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ext4_xattr_list()
|
* Inode operation listxattr()
|
||||||
|
*
|
||||||
|
* d_inode(dentry)->i_rwsem: don't care
|
||||||
*
|
*
|
||||||
* Copy a list of attribute names into the buffer
|
* Copy a list of attribute names into the buffer
|
||||||
* provided, or compute the buffer size required.
|
* provided, or compute the buffer size required.
|
||||||
@ -528,8 +517,8 @@ cleanup:
|
|||||||
* Returns a negative error number on failure, or the number of bytes
|
* Returns a negative error number on failure, or the number of bytes
|
||||||
* used / required on success.
|
* used / required on success.
|
||||||
*/
|
*/
|
||||||
static int
|
ssize_t
|
||||||
ext4_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
|
ext4_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)
|
||||||
{
|
{
|
||||||
int ret, ret2;
|
int ret, ret2;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user