Btrfs: fix wrong argument for btrfs_lookup_ordered_range
authorLiu Bo <bo.li.liu@oracle.com>
Tue, 24 Jan 2017 23:58:51 +0000 (15:58 -0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Feb 2017 14:50:59 +0000 (15:50 +0100)
Commit Btrfs: btrfs_page_mkwrite: Reserve space in sectorsized units"
(d0b7da88) did this, but btrfs_lookup_ordered_range expects a 'length'
rather than a 'page_end'.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c

index 70f932d4b69d07bae8b7e199767a55c4707d1bfa..ac5f8c4042683a7506620a78d6559cdcd70cee44 100644 (file)
@@ -9038,7 +9038,7 @@ again:
         * we can't set the delalloc bits if there are pending ordered
         * extents.  Drop our locks and wait for them to finish
         */
-       ordered = btrfs_lookup_ordered_range(inode, page_start, page_end);
+       ordered = btrfs_lookup_ordered_range(inode, page_start, PAGE_SIZE);
        if (ordered) {
                unlock_extent_cached(io_tree, page_start, page_end,
                                     &cached_state, GFP_NOFS);