]> git.baikalelectronics.ru Git - kernel.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)
committerJosef Bacik <josef@redhat.com>
Thu, 15 Dec 2011 16:04:24 +0000 (11:04 -0500)
commit03fa0b93f3eaef98068bbbffc3f8d4ed4d2a8e8c
treebec733b7d6f2794a86622ad76948c0be2c152170
parent3c66da9bfb15ceeb6487564d711dbe47d6064102
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>
fs/btrfs/inode.c