aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-08-30 12:34:28 -0400
committerJosef Bacik <josef@redhat.com>2011-10-19 15:12:44 -0400
commit4a92b1b8d2810db4ea0c34616b94c0b3810fa027 (patch)
treedd01cff1987b8178be84f8b750951497b7f525a7 /fs/btrfs/inode.c
parentd02c9955ded7fc56dd1edc987558b084ccb03eb4 (diff)
Btrfs: stop passing a trans handle all around the reservation code
The only thing that we need to have a trans handle for is in reserve_metadata_bytes and thats to know how much flushing we can do. So instead of passing it around, just check current->journal_info for a trans_handle so we know if we can commit a transaction to try and free up space or not. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 78b5ae59ac4f..2947e94947b5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3577,7 +3577,7 @@ void btrfs_evict_inode(struct inode *inode)
3577 * doing the truncate. 3577 * doing the truncate.
3578 */ 3578 */
3579 while (1) { 3579 while (1) {
3580 ret = btrfs_block_rsv_check(NULL, root, rsv, min_size, 0, 1); 3580 ret = btrfs_block_rsv_check(root, rsv, min_size, 0, 1);
3581 if (ret) { 3581 if (ret) {
3582 printk(KERN_WARNING "Could not get space for a " 3582 printk(KERN_WARNING "Could not get space for a "
3583 "delete, will truncate on mount %d\n", ret); 3583 "delete, will truncate on mount %d\n", ret);
@@ -6577,7 +6577,7 @@ static int btrfs_truncate(struct inode *inode)
6577 btrfs_add_ordered_operation(trans, root, inode); 6577 btrfs_add_ordered_operation(trans, root, inode);
6578 6578
6579 while (1) { 6579 while (1) {
6580 ret = btrfs_block_rsv_check(trans, root, rsv, min_size, 0, 1); 6580 ret = btrfs_block_rsv_check(root, rsv, min_size, 0, 1);
6581 if (ret) { 6581 if (ret) {
6582 /* 6582 /*
6583 * This can only happen with the original transaction we 6583 * This can only happen with the original transaction we