]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
btrfs: defrag: use btrfs_mod_outstanding_extents in cluster_pages_for_defrag
authorSu Yue <suy.fnst@cn.fujitsu.com>
Wed, 5 Sep 2018 03:07:33 +0000 (11:07 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:28 +0000 (17:23 +0200)
Since commit 8b62f87bad9c ("Btrfs: rework outstanding_extents"),
manual operations of outstanding_extent in btrfs_inode are replaced by
btrfs_mod_outstanding_extents().
The one in cluster_pages_for_defrag seems to be lost, so replace it
of btrfs_mod_outstanding_extents().

Fixes: 8b62f87bad9c ("Btrfs: rework outstanding_extents")
Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c

index ef8da14391d218093800a9688db3754edb2dd819..4905d13dee0a05b5a82eee937b3424acd48fc9b5 100644 (file)
@@ -1323,7 +1323,7 @@ static int cluster_pages_for_defrag(struct inode *inode,
 
        if (i_done != page_cnt) {
                spin_lock(&BTRFS_I(inode)->lock);
-               BTRFS_I(inode)->outstanding_extents++;
+               btrfs_mod_outstanding_extents(BTRFS_I(inode), 1);
                spin_unlock(&BTRFS_I(inode)->lock);
                btrfs_delalloc_release_space(inode, data_reserved,
                                start_index << PAGE_SHIFT,