diff options
author | Josef Bacik <josef@redhat.com> | 2012-01-13 18:09:22 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-01-16 21:29:43 +0100 |
commit | f248679e86fead40cc78e724c7181d6bec1a2046 (patch) | |
tree | 88abeee0b2a87c0f0377509525c92d3c9ec15a15 /fs/btrfs/relocation.c | |
parent | Btrfs: space leak tracepoints (diff) | |
download | linux-f248679e86fead40cc78e724c7181d6bec1a2046.tar.xz linux-f248679e86fead40cc78e724c7181d6bec1a2046.zip |
Btrfs: add a delalloc mutex to inodes for delalloc reservations
I was using i_mutex for this, but we're getting bogus lockdep warnings by doing
that and theres no real way to get rid of those, so just stop using i_mutex to
protect delalloc metadata reservations and use a delalloc mutex instead. This
shouldn't be contended often at all, only if you are writing and mmap writing to
the file at the same time. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/relocation.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index efe9f792544d..8c1aae2c845d 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2949,9 +2949,7 @@ 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; |