浏览代码

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 <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Josef Bacik 12 年之前
父节点
当前提交
6596a92819
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      fs/btrfs/transaction.c

+ 1 - 2
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
 	 * If we encounter a transaction abort during snapshot cleaning, we
 	 * don't want to crash here
 	 * don't want to crash here
 	 */
 	 */
-	BUG_ON(ret < 0 && ret != -EAGAIN && ret != -EROFS);
-	return 1;
+	return (ret < 0) ? 0 : 1;
 }
 }