]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't return ino to ino cache if inode item removal fails
authorOmar Sandoval <osandov@fb.com>
Fri, 11 May 2018 20:13:35 +0000 (13:13 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:23:51 +0000 (18:23 +0200)
commitd4743190adc55b42f102e783efa249fb096e4b8c
treefb80d9263ef9e7313ff310f900e2783ba9b47124
parent15c1c4bcc386914229a8a53ca91ef535f62d5e50
Btrfs: don't return ino to ino cache if inode item removal fails

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: cad23f2ac810 ("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>
fs/btrfs/inode.c