[PATCH v9 13/16] Btrfs: fix transactin abortion in __btrfs_free_extent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need to reset @refs_to_drop to 1 when we're going to delete the last
special dedup reference, otherwise we can trigger (@refs < @refs_to_drop)
and end up with transaction abortion.

Signed-off-by: Liu Bo <bo.li.liu@xxxxxxxxxx>
---
 fs/btrfs/extent-tree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 4c1c342..1cb3ec5 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -5931,6 +5931,7 @@ again:
 			btrfs_release_path(path);
 			root_objectid = BTRFS_DEDUP_TREE_OBJECTID;
 			parent = 0;
+			refs_to_drop = 1;
 
 			goto again;
 		}
-- 
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux