Commit 2c4f9923 authored by Eric Biggers's avatar Eric Biggers Committed by Theodore Ts'o

ext4: rename ext4_xattr_check_names() to ext4_xattr_check_entries()

ext4_xattr_check_names() actually validates both the xattr names and
values, not just the names.  So rename it to ext4_xattr_check_entries()
to avoid confusion.
Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent ba7ea1d8
...@@ -162,8 +162,8 @@ ext4_xattr_handler(int name_index) ...@@ -162,8 +162,8 @@ ext4_xattr_handler(int name_index)
} }
static int static int
ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end, ext4_xattr_check_entries(struct ext4_xattr_entry *entry, void *end,
void *value_start) void *value_start)
{ {
struct ext4_xattr_entry *e = entry; struct ext4_xattr_entry *e = entry;
...@@ -217,8 +217,8 @@ ext4_xattr_check_block(struct inode *inode, struct buffer_head *bh) ...@@ -217,8 +217,8 @@ ext4_xattr_check_block(struct inode *inode, struct buffer_head *bh)
return -EFSCORRUPTED; return -EFSCORRUPTED;
if (!ext4_xattr_block_csum_verify(inode, bh)) if (!ext4_xattr_block_csum_verify(inode, bh))
return -EFSBADCRC; return -EFSBADCRC;
error = ext4_xattr_check_names(BFIRST(bh), bh->b_data + bh->b_size, error = ext4_xattr_check_entries(BFIRST(bh), bh->b_data + bh->b_size,
bh->b_data); bh->b_data);
if (!error) if (!error)
set_buffer_verified(bh); set_buffer_verified(bh);
return error; return error;
...@@ -233,7 +233,7 @@ __xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *header, ...@@ -233,7 +233,7 @@ __xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *header,
if (end - (void *)header < sizeof(*header) + sizeof(u32) || if (end - (void *)header < sizeof(*header) + sizeof(u32) ||
(header->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC))) (header->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC)))
goto errout; goto errout;
error = ext4_xattr_check_names(IFIRST(header), end, IFIRST(header)); error = ext4_xattr_check_entries(IFIRST(header), end, IFIRST(header));
errout: errout:
if (error) if (error)
__ext4_error_inode(inode, function, line, 0, __ext4_error_inode(inode, function, line, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment