diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2015-09-08 17:22:43 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-21 18:41:04 -0700 |
commit | d9d8b2a51a404c2d45b9dc4c755f62cb3ddb7c79 (patch) | |
tree | 4405c3e139e22e0ae72f3080340eb7ce1da28d89 /fs/btrfs/extent-tree.c | |
parent | 4ceff0792d36256a5f879cec51c56e44db90b8ec (diff) | |
download | linux-d9d8b2a51a404c2d45b9dc4c755f62cb3ddb7c79.tar.bz2 |
btrfs: extent-tree: Switch to new check_data_free_space and free_reserved_data_space
Use new reserve/free for buffered write and inode cache.
For buffered write case, as nodatacow write won't increase quota account,
so unlike old behavior which does reserve before check nocow, now we
check nocow first and then only reserve data if we can't do nocow write.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 71c172e12b19..3c58fc34aa10 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3356,7 +3356,7 @@ again: num_pages *= 16; num_pages *= PAGE_CACHE_SIZE; - ret = btrfs_check_data_free_space(inode, num_pages, num_pages); + ret = __btrfs_check_data_free_space(inode, 0, num_pages); if (ret) goto out_put; @@ -3365,7 +3365,7 @@ again: &alloc_hint); if (!ret) dcs = BTRFS_DC_SETUP; - btrfs_free_reserved_data_space(inode, num_pages); + __btrfs_free_reserved_data_space(inode, 0, num_pages); out_put: iput(inode); |