From: Chris Mason Date: Thu, 15 Dec 2011 18:43:49 +0000 (-0500) Subject: Merge branch 'for-chris' of http://git.kernel.org/pub/scm/linux/kernel/git/josef... X-Git-Tag: v3.12-rc1~4220^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=567a45e917343c952806bb9f5c19aab0139bd519;p=kernel%2Fkernel-generic.git Merge branch 'for-chris' of git./linux/kernel/git/josef/btrfs-work into integration Conflicts: fs/btrfs/inode.c Signed-off-by: Chris Mason --- 567a45e917343c952806bb9f5c19aab0139bd519 diff --cc fs/btrfs/inode.c index d4a9195,b212f39..740e67b --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@@ -3414,20 -3385,16 +3422,19 @@@ static int btrfs_setsize(struct inode * return 0; if (newsize > oldsize) { - i_size_write(inode, newsize); - btrfs_ordered_update_i_size(inode, i_size_read(inode), NULL); truncate_pagecache(inode, oldsize, newsize); ret = btrfs_cont_expand(inode, oldsize, newsize); - if (ret) { - btrfs_setsize(inode, oldsize); + if (ret) return ret; - } - ret = btrfs_dirty_inode(inode); + trans = btrfs_start_transaction(root, 1); + if (IS_ERR(trans)) + return PTR_ERR(trans); + + i_size_write(inode, newsize); + btrfs_ordered_update_i_size(inode, i_size_read(inode), NULL); + ret = btrfs_update_inode(trans, root, inode); - + btrfs_end_transaction_throttle(trans, root); } else { /*