diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2018-01-25 11:02:53 -0700 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-02-02 16:24:35 +0100 |
commit | e8f1bc1493855e32b7a2a019decc3c353d94daf6 (patch) | |
tree | 34e4b92f80613658a760de63937af6e498566de1 /fs/pnode.h | |
parent | 55237a5f2431a72435e3ed39e4306e973c0446b7 (diff) | |
download | linux-stable-e8f1bc1493855e32b7a2a019decc3c353d94daf6.tar.gz linux-stable-e8f1bc1493855e32b7a2a019decc3c353d94daf6.tar.bz2 linux-stable-e8f1bc1493855e32b7a2a019decc3c353d94daf6.zip |
Btrfs: fix btrfs_evict_inode to handle abnormal inodes correctly
This regression is introduced in
commit 3d48d9810de4 ("btrfs: Handle uninitialised inode eviction").
There are two problems,
a) it is ->destroy_inode() that does the final free on inode, not
->evict_inode(),
b) clear_inode() must be called before ->evict_inode() returns.
This could end up hitting BUG_ON(inode->i_state != (I_FREEING | I_CLEAR));
in evict() because I_CLEAR is set in clear_inode().
Fixes: commit 3d48d9810de4 ("btrfs: Handle uninitialised inode eviction")
Cc: <stable@vger.kernel.org> # v4.7-rc6+
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/pnode.h')
0 files changed, 0 insertions, 0 deletions