aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2012-01-13 23:59:13 -0600
committerSteve French <sfrench@us.ibm.com>2012-01-13 23:59:13 -0600
commitdcd169b761d52e3f9122e30442b83863bdf1d9d9 (patch)
tree5e79741f1865a3aef840e68d7db9e7ed4d685b5a /fs/btrfs/relocation.c
parentaaf015890754d58dcb71a4aa44ed246bb082bcf6 (diff)
parent7250170c9ed00f3b74b11b98afefab45020672dd (diff)
Merge branch 'master' of git+ssh://git.samba.org/data/git/sfrench/cifs-2.6
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index dff29d5e151a..cfb55434a469 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2947,7 +2947,9 @@ static int relocate_file_extent_cluster(struct inode *inode,
index = (cluster->start - offset) >> PAGE_CACHE_SHIFT;
last_index = (cluster->end - offset) >> PAGE_CACHE_SHIFT;
while (index <= last_index) {
+ mutex_lock(&inode->i_mutex);
ret = btrfs_delalloc_reserve_metadata(inode, PAGE_CACHE_SIZE);
+ mutex_unlock(&inode->i_mutex);
if (ret)
goto out;