linux/fs/btrfs
Josef Bacik d132a538d2 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>
2011-06-04 08:03:45 -04:00
..
Kconfig btrfs: Add lzo compression support 2010-12-22 23:15:47 +08:00
Makefile Merge branch 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/arne/btrfs-unstable-arne into inode_numbers 2011-05-23 06:30:52 -04:00
acl.c Merge branch 'cleanups' of git://repo.or.cz/linux-2.6/btrfs-unstable into inode_numbers 2011-05-22 12:33:42 -04:00
async-thread.c Btrfs: don't walk around with task->state != TASK_RUNNING 2010-05-25 10:34:58 -04:00
async-thread.h Btrfs: fix deadlock on async thread startup 2009-10-05 09:44:45 -04:00
btrfs_inode.h Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
compat.h Btrfs: drop remaining LINUX_KERNEL_VERSION checks and compat code 2009-01-06 09:38:55 -05:00
compression.c Merge branch 'cleanups' of git://repo.or.cz/linux-2.6/btrfs-unstable into inode_numbers 2011-05-22 12:33:42 -04:00
compression.h btrfs: rename variables clashing with global function names 2011-05-02 13:57:19 +02:00
ctree.c Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
ctree.h Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
delayed-inode.c Btrfs: fix uninit variable in the delayed inode code 2011-06-04 08:03:43 -04:00
delayed-inode.h btrfs: implement delayed inode items operation 2011-05-21 09:30:56 -04:00
delayed-ref.c btrfs: remove old unused commented out code 2011-05-06 12:34:10 +02:00
delayed-ref.h btrfs: remove all unused functions 2011-05-06 12:34:03 +02:00
dir-item.c Merge branch 'cleanups_and_fixes' into inode_numbers 2011-05-23 14:37:47 -04:00
disk-io.c Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
disk-io.h Merge branch 'cleanups' of git://repo.or.cz/linux-2.6/btrfs-unstable into inode_numbers 2011-05-22 12:33:42 -04:00
export.c Merge branch 'ino-alloc' of git://repo.or.cz/linux-btrfs-devel into inode_numbers 2011-05-21 09:27:38 -04:00
export.h NFS support for btrfs - v3 2008-09-25 11:04:06 -04:00
extent-tree.c Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
extent_io.c Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
extent_io.h btrfs: remove all unused functions 2011-05-06 12:34:03 +02:00
extent_map.c btrfs: drop gfp parameter from alloc_extent_map 2011-05-02 13:57:21 +02:00
extent_map.h btrfs: drop gfp parameter from alloc_extent_map 2011-05-02 13:57:21 +02:00
file-item.c Merge branch 'cleanups_and_fixes' into inode_numbers 2011-05-23 14:37:47 -04:00
file.c Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
free-space-cache.c Btrfs: make sure we don't overflow the free space cache crc page 2011-06-04 08:03:43 -04:00
free-space-cache.h btrfs: remove all unused functions 2011-05-06 12:34:03 +02:00
hash.h Btrfs: remove crc32c.h and use libcrc32c directly. 2009-06-10 11:29:53 -04:00
inode-item.c Btrfs: BUG_ON is deleted from the caller of btrfs_truncate_item & btrfs_extend_item 2011-05-23 13:24:39 -04:00
inode-map.c Btrfs: don't save the inode cache if we are deleting this root 2011-06-04 08:03:45 -04:00
inode-map.h Btrfs: Support reading/writing on disk free ino cache 2011-04-25 16:46:11 +08:00
inode.c Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
ioctl.c Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
ioctl.h Btrfs: add mount -o auto_defrag 2011-05-26 17:52:15 -04:00
locking.c btrfs: remove all unused functions 2011-05-06 12:34:03 +02:00
locking.h btrfs: remove all unused functions 2011-05-06 12:34:03 +02:00
lzo.c Btrfs: Avoid accessing unmapped kernel address 2011-02-16 15:37:58 -05:00
ordered-data.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
ordered-data.h btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
orphan.c Btrfs: fixup return code for btrfs_del_orphan_item 2010-12-09 13:57:15 -05:00
print-tree.c btrfs: fix missing break in switch phrase 2011-01-28 16:40:37 -05:00
print-tree.h Btrfs: Create extent_buffer interface for large blocksizes 2008-09-25 11:03:56 -04:00
ref-cache.c btrfs: remove all unused functions 2011-05-06 12:34:03 +02:00
ref-cache.h btrfs: remove all unused functions 2011-05-06 12:34:03 +02:00
relocation.c Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
root-tree.c Merge branch 'cleanups_and_fixes' into inode_numbers 2011-05-23 14:37:47 -04:00
scrub.c btrfs: scrub: don't reuse bios and pages 2011-06-04 08:03:17 -04:00
struct-funcs.c Btrfs: Fix checkpatch.pl warnings 2009-01-05 21:25:51 -05:00
super.c Btrfs: add mount -o auto_defrag 2011-05-26 17:52:15 -04:00
sysfs.c Merge branch 'cleanups' of git://repo.or.cz/linux-2.6/btrfs-unstable into inode_numbers 2011-05-22 12:33:42 -04:00
transaction.c Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
transaction.h Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
tree-defrag.c btrfs: drop unused parameter from btrfs_release_path 2011-05-02 13:57:22 +02:00
tree-log.c Merge branch 'cleanups_and_fixes' into inode_numbers 2011-05-23 14:37:47 -04:00
tree-log.h btrfs: remove unused function prototypes 2011-05-04 14:01:26 +02:00
version.h Update Btrfs files for in-kernel usage 2008-09-25 15:41:59 -04:00
volumes.c btrfs: false BUG_ON when degraded 2011-06-04 08:03:44 -04:00
volumes.h Merge branch 'cleanups_and_fixes' into inode_numbers 2011-05-23 14:37:47 -04:00
xattr.c Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
xattr.h fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00
zlib.c zlib: slim down zlib_deflate() workspace when possible 2011-03-22 17:44:17 -07:00