diff options
author | Eric Biggers <ebiggers@google.com> | 2017-04-29 23:56:52 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-04-29 23:56:52 -0400 |
commit | 2c4f9923374843384cfd3a2edc0f02c19a7a29e2 (patch) | |
tree | 14cb6c83a5674bb046b117b4f550a705daf61bc2 | |
parent | ba7ea1d8f45383cb88858057e9bf60cd8cf3b898 (diff) |
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: Eric Biggers <ebiggers@google.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | fs/ext4/xattr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 8e9d0d4c6234..c5a3e98bd74d 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -162,8 +162,8 @@ ext4_xattr_handler(int name_index) | |||
162 | } | 162 | } |
163 | 163 | ||
164 | static int | 164 | static int |
165 | ext4_xattr_check_names(struct ext4_xattr_entry *entry, void *end, | 165 | ext4_xattr_check_entries(struct ext4_xattr_entry *entry, void *end, |
166 | void *value_start) | 166 | void *value_start) |
167 | { | 167 | { |
168 | struct ext4_xattr_entry *e = entry; | 168 | struct ext4_xattr_entry *e = entry; |
169 | 169 | ||
@@ -217,8 +217,8 @@ ext4_xattr_check_block(struct inode *inode, struct buffer_head *bh) | |||
217 | return -EFSCORRUPTED; | 217 | return -EFSCORRUPTED; |
218 | if (!ext4_xattr_block_csum_verify(inode, bh)) | 218 | if (!ext4_xattr_block_csum_verify(inode, bh)) |
219 | return -EFSBADCRC; | 219 | return -EFSBADCRC; |
220 | error = ext4_xattr_check_names(BFIRST(bh), bh->b_data + bh->b_size, | 220 | error = ext4_xattr_check_entries(BFIRST(bh), bh->b_data + bh->b_size, |
221 | bh->b_data); | 221 | bh->b_data); |
222 | if (!error) | 222 | if (!error) |
223 | set_buffer_verified(bh); | 223 | set_buffer_verified(bh); |
224 | return error; | 224 | return error; |
@@ -233,7 +233,7 @@ __xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *header, | |||
233 | if (end - (void *)header < sizeof(*header) + sizeof(u32) || | 233 | if (end - (void *)header < sizeof(*header) + sizeof(u32) || |
234 | (header->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC))) | 234 | (header->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC))) |
235 | goto errout; | 235 | goto errout; |
236 | error = ext4_xattr_check_names(IFIRST(header), end, IFIRST(header)); | 236 | error = ext4_xattr_check_entries(IFIRST(header), end, IFIRST(header)); |
237 | errout: | 237 | errout: |
238 | if (error) | 238 | if (error) |
239 | __ext4_error_inode(inode, function, line, 0, | 239 | __ext4_error_inode(inode, function, line, 0, |