Message ID | 1397101727-20806-9-git-send-email-bo.li.liu@oracle.com (mailing list archive) |
---|---|
State | Under Review |
Headers | show |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 8e031bf..0c1a43e 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3213,6 +3213,7 @@ out: * truncated case if we didn't write out the extent at all. */ if ((ret || !logical_len) && + !ordered_extent->dedup && !test_bit(BTRFS_ORDERED_NOCOW, &ordered_extent->flags) && !test_bit(BTRFS_ORDERED_PREALLOC, &ordered_extent->flags)) btrfs_free_reserved_extent(root, ordered_extent->start,
If the ordered extent had an IOERR or something else went wrong we need to return the space for this ordered extent back to the allocator, but if the extent is marked as a dedup one, we don't free the space because we just use the existing space instead of allocating new space. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> --- fs/btrfs/inode.c | 1 + 1 file changed, 1 insertion(+)