summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-09-08 17:25:55 +0800
committerChris Mason <clm@fb.com>2015-10-21 18:41:06 -0700
commit7cf5b97650f2ecefbd5afa2d58b61b289b6e3750 (patch)
tree65bdb57078053527218338c59e4e34057d3206d1 /fs/btrfs/file.c
parentdf480633b891cf03301d87e56024a8ec3251da5b (diff)
downloadop-kernel-dev-7cf5b97650f2ecefbd5afa2d58b61b289b6e3750.zip
op-kernel-dev-7cf5b97650f2ecefbd5afa2d58b61b289b6e3750.tar.gz
btrfs: qgroup: Cleanup old inaccurate facilities
Cleanup the old facilities which use old btrfs_qgroup_reserve() function call, replace them with the newer version, and remove the "__" prefix in them. Also, make btrfs_qgroup_reserve/free() functions private, as they are now only used inside qgroup codes. Now, the whole btrfs qgroup is swithed to use the new reserve facilities. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 29b3702..47785c8 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1529,7 +1529,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
goto reserve_metadata;
}
}
- ret = __btrfs_check_data_free_space(inode, pos, write_bytes);
+ ret = btrfs_check_data_free_space(inode, pos, write_bytes);
if (ret < 0)
break;
@@ -1537,8 +1537,8 @@ reserve_metadata:
ret = btrfs_delalloc_reserve_metadata(inode, reserve_bytes);
if (ret) {
if (!only_release_metadata)
- __btrfs_free_reserved_data_space(inode, pos,
- write_bytes);
+ btrfs_free_reserved_data_space(inode, pos,
+ write_bytes);
else
btrfs_end_write_no_snapshoting(root);
break;
@@ -1608,7 +1608,7 @@ again:
btrfs_delalloc_release_metadata(inode,
release_bytes);
else
- __btrfs_delalloc_release_space(inode, pos,
+ btrfs_delalloc_release_space(inode, pos,
release_bytes);
}
@@ -1661,8 +1661,7 @@ again:
btrfs_end_write_no_snapshoting(root);
btrfs_delalloc_release_metadata(inode, release_bytes);
} else {
- __btrfs_delalloc_release_space(inode, pos,
- release_bytes);
+ btrfs_delalloc_release_space(inode, pos, release_bytes);
}
}
@@ -2708,8 +2707,8 @@ static long btrfs_fallocate(struct file *file, int mode,
out:
mutex_unlock(&inode->i_mutex);
/* Let go of our reservation. */
- __btrfs_free_reserved_data_space(inode, alloc_start,
- alloc_end - alloc_start);
+ btrfs_free_reserved_data_space(inode, alloc_start,
+ alloc_end - alloc_start);
return ret;
}
OpenPOWER on IntegriCloud