]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: don't panic if orphan item already exists
authorJosef Bacik <josef@redhat.com>
Tue, 13 Dec 2011 17:55:58 +0000 (12:55 -0500)
committerChris Mason <chris.mason@oracle.com>
Fri, 16 Dec 2011 19:55:54 +0000 (14:55 -0500)
commit2d524473836cb777e8b67b6925577c38b2940624
tree32bd7a5720cebb1a2ddc73ad9926db51771295e3
parent576eaeaa81ce0f4c2555e7d96dafe126b66e60ab
Btrfs: don't panic if orphan item already exists

I've been hitting this BUG_ON() in btrfs_orphan_add when running xfstest 269 in
a loop.  This is because we will add an orphan item, do the truncate, the
truncate will fail for whatever reason (*cough*ENOSPC*cough*) and then we're
left with an orphan item still in the fs.  Then we come back later to do another
truncate and it blows up because we already have an orphan item.  This is ok so
just fix the BUG_ON() to only BUG() if ret is not EEXIST.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
(cherry picked from commit ee4d89f0c4967c624c92516fcc37b41069bfdc23)
fs/btrfs/inode.c