summaryrefslogtreecommitdiffstats
path: root/block/blk-exec.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-05-31 21:33:33 +0200
committerChris Mason <chris.mason@oracle.com>2011-06-04 14:03:45 +0200
commitd132a538d258f8f52fd0cd8b5017755f4e915386 (patch)
treebf3a5e67c8eff57425dd656778b40c5aaf858f80 /block/blk-exec.c
parentbtrfs: false BUG_ON when degraded (diff)
downloadlinux-d132a538d258f8f52fd0cd8b5017755f4e915386.tar.xz
linux-d132a538d258f8f52fd0cd8b5017755f4e915386.zip
Btrfs: don't save the inode cache if we are deleting this root
With xfstest 254 I can panic the box every time with the inode number caching stuff on. This is because we clean the inodes out when we delete the subvolume, but then we write out the inode cache which adds an inode to the subvolume inode tree, and then when it gets evicted again the root gets added back on the dead roots list and is deleted again, so we have a double free. To stop this from happening just return 0 if refs is 0 (and we're not the tree root since tree root always has refs of 0). With this fix 254 no longer panics. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Tested-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'block/blk-exec.c')
0 files changed, 0 insertions, 0 deletions