Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243150
b: refs/heads/master
c: 930f028
h: refs/heads/master
v: v3
  • Loading branch information
Josef Bacik committed Mar 17, 2011
1 parent 3e5bf18 commit 2ac9cb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0cd846e9221811d87047f1428cf5226e7236efe
refs/heads/master: 930f028abe39dfd0849b53131d19c4b67aacbe67
16 changes: 1 addition & 15 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3640,10 +3640,7 @@ int btrfs_cont_expand(struct inode *inode, loff_t oldsize, loff_t size)

static int btrfs_setsize(struct inode *inode, loff_t newsize)
{
struct btrfs_root *root = BTRFS_I(inode)->root;
struct btrfs_trans_handle *trans;
loff_t oldsize = i_size_read(inode);
unsigned long nr;
int ret;

if (newsize == oldsize)
Expand All @@ -3659,18 +3656,7 @@ static int btrfs_setsize(struct inode *inode, loff_t newsize)
return ret;
}

trans = btrfs_start_transaction(root, 1);
if (IS_ERR(trans))
return PTR_ERR(trans);

ret = btrfs_update_inode(trans, root, inode);
if (ret) {
btrfs_end_transaction(trans, root);
return ret;
}
nr = trans->blocks_used;
btrfs_end_transaction(trans, root);
btrfs_btree_balance_dirty(root, nr);
mark_inode_dirty(inode);
} else {

/*
Expand Down

0 comments on commit 2ac9cb4

Please sign in to comment.