1 ext4: fix ref counting for ea_inode
3 From: Tahsin Erdogan <tahsin@google.com>
5 The ref count on ea_inode is incremented by
6 ext4_xattr_inode_orphan_add() which is supposed to be decremented by
7 ext4_xattr_inode_array_free(). The decrement is conditioned on whether
8 the ea_inode is currently on the orphan list. However, the orphan list
9 addition only happens when journaling is enabled. In non-journaled case,r
10 we fail to release the ref count causing an error message like below.
12 "VFS: Busy inodes after unmount of sdb. Self-destruct in 5 seconds.
15 Signed-off-by: Tahsin Erdogan <tahsin@google.com>
16 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
18 fs/ext4/xattr.c | 3 +--
19 1 file changed, 1 insertion(+), 2 deletions(-)
21 diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
22 index 32ad2f2870e9..13daf634244b 100644
25 @@ -2098,8 +2098,7 @@ ext4_xattr_inode_array_free(struct inode *inode,
28 /* for inode's i_count get from ext4_xattr_delete_inode */
29 - if (!list_empty(&EXT4_I(ea_inode)->i_orphan))
32 clear_nlink(ea_inode);
36 2.13.1.611.g7e3b11ae1-goog