summaryrefslogtreecommitdiff
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorTahsin Erdogan <tahsin@google.com>2017-06-22 10:26:31 -0400
committerTheodore Ts'o <tytso@mit.edu>2017-06-22 10:26:31 -0400
commit0421a189bc8cdefa18a34aee962ac0558679b944 (patch)
tree3e701dfeeca3c987d1c815e8fa1461ea979bf8b8 /fs/ext4/inode.c
parentc1a5d5f6ab21eb7e6ff8cb99489d9001cf2a2850 (diff)
ext4: modify ext4_xattr_ino_array to hold struct inode *
Tracking struct inode * rather than the inode number eliminates the repeated ext4_xattr_inode_iget() call later. The second call cannot fail in practice but still requires explanation when it wants to ignore the return value. Avoid the trouble and make things simple. Signed-off-by: Tahsin Erdogan <tahsin@google.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index fda70fedf56d..1b2a68c5ea42 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -188,7 +188,7 @@ void ext4_evict_inode(struct inode *inode)
handle_t *handle;
int err;
int extra_credits = 3;
- struct ext4_xattr_ino_array *lea_ino_array = NULL;
+ struct ext4_xattr_inode_array *ea_inode_array = NULL;
trace_ext4_evict_inode(inode);
@@ -257,7 +257,7 @@ void ext4_evict_inode(struct inode *inode)
/*
* Delete xattr inode before deleting the main inode.
*/
- err = ext4_xattr_delete_inode(handle, inode, &lea_ino_array);
+ err = ext4_xattr_delete_inode(handle, inode, &ea_inode_array);
if (err) {
ext4_warning(inode->i_sb,
"couldn't delete inode's xattr (err %d)", err);
@@ -345,9 +345,7 @@ void ext4_evict_inode(struct inode *inode)
ext4_journal_stop(handle);
sb_end_intwrite(inode->i_sb);
-
- if (lea_ino_array != NULL)
- ext4_xattr_inode_array_free(inode, lea_ino_array);
+ ext4_xattr_inode_array_free(ea_inode_array);
return;
no_delete:
ext4_clear_inode(inode); /* We must guarantee clearing of inode... */