Btrfs: use the correct type when creating cow dio extent
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 21 Feb 2017 20:12:58 +0000 (12:12 -0800)
committerChris Mason <clm@fb.com>
Wed, 22 Feb 2017 23:55:03 +0000 (15:55 -0800)
'BTRFS_ORDERED_REGULAR' was introduced for the cow case in patch
'Btrfs: specify a new ordered extent type for create_io_em',
but it missed the directIO cow case.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/inode.c

index dae2734a725bd85acbfa47ebb2f0349b1d6a613d..c38391e948d97e3a8bd9c08bf76f0ca75a858325 100644 (file)
@@ -7190,7 +7190,7 @@ static struct extent_map *btrfs_new_extent_direct(struct inode *inode,
 
        em = btrfs_create_dio_extent(inode, start, ins.offset, start,
                                     ins.objectid, ins.offset, ins.offset,
-                                    ins.offset, 0);
+                                    ins.offset, BTRFS_ORDERED_REGULAR);
        btrfs_dec_block_group_reservations(fs_info, ins.objectid);
        if (IS_ERR(em))
                btrfs_free_reserved_extent(fs_info, ins.objectid,