diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-12-15 19:43:49 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-12-15 19:43:49 +0100 |
commit | 567a45e917343c952806bb9f5c19aab0139bd519 (patch) | |
tree | b1d6dac31a3a2836d24662139f21bb1ddc2522d3 /fs/btrfs/ioctl.c | |
parent | Btrfs: deal with NULL srv_rsv in the delalloc inode reservation code (diff) | |
parent | Btrfs: only set cache_generation if we setup the block group (diff) | |
download | linux-567a45e917343c952806bb9f5c19aab0139bd519.tar.xz linux-567a45e917343c952806bb9f5c19aab0139bd519.zip |
Merge branch 'for-chris' of http://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work into integration
Conflicts:
fs/btrfs/inode.c
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 40eaa9fdf07c..c04f02c7d5bb 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -858,8 +858,10 @@ static int cluster_pages_for_defrag(struct inode *inode, return 0; file_end = (isize - 1) >> PAGE_CACHE_SHIFT; + mutex_lock(&inode->i_mutex); ret = btrfs_delalloc_reserve_space(inode, num_pages << PAGE_CACHE_SHIFT); + mutex_unlock(&inode->i_mutex); if (ret) return ret; again: |