mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-18 19:12:56 +00:00
Btrfs: don't return ino to ino cache if inode item removal fails
commitc08db7d8d2upstream. In btrfs_evict_inode(), if btrfs_truncate_inode_items() fails, the inode item will still be in the tree but we still return the ino to the ino cache. That will blow up later when someone tries to allocate that ino, so don't return it to the cache. Fixes:581bb05094("Btrfs: Cache free inode numbers in memory") Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com> [bwh: Backported to 3.16: - Pass inode, not btrfs_inode, to btrfs_orphan_del() - Pass btrfs_root, not btrfs_fs_info, to btrfs_free_block_rsv() - Adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
parent
c43320eb30
commit
72bfa437a5
1 changed files with 13 additions and 12 deletions
Loading…
Add table
Add a link
Reference in a new issue