From: Josef Bacik Date: Wed, 31 Jul 2013 14:28:05 +0000 (-0400) Subject: Btrfs: don't bug_on when we fail when cleaning up transactions X-Git-Tag: v3.12-rc1~40^2~83 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=6596a9281995a3c7dee8ca6666bd169fffc928e1;p=~emulex%2Finfiniband.git Btrfs: don't bug_on when we fail when cleaning up transactions There is no reason for this sort of jackassery. Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 18f7e71d159..ea8d52212d7 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1942,6 +1942,5 @@ int btrfs_clean_one_deleted_snapshot(struct btrfs_root *root) * If we encounter a transaction abort during snapshot cleaning, we * don't want to crash here */ - BUG_ON(ret < 0 && ret != -EAGAIN && ret != -EROFS); - return 1; + return (ret < 0) ? 0 : 1; }