diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-05-17 23:31:23 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-05-17 23:31:23 -0400 |
commit | 0568c518937ee3a9b6a94d18bae9c150fe5d6832 (patch) | |
tree | b6392f24142e9199a7a0b34e29ac2f6c82a221d7 /fs/ext4 | |
parent | 6fd058f7791087648c683eb8572edf3be3c4c23c (diff) |
ext4: down i_data_sem only for read when walking tree for fiemap
Not sure why I put this in as down_write originally; all we are
doing is walking the tree, nothing will change under us and
concurrent reads should be no problem.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/extents.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index d04b779b780e..d4e99e96fddb 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -3312,10 +3312,10 @@ int ext4_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, | |||
3312 | * Walk the extent tree gathering extent information. | 3312 | * Walk the extent tree gathering extent information. |
3313 | * ext4_ext_fiemap_cb will push extents back to user. | 3313 | * ext4_ext_fiemap_cb will push extents back to user. |
3314 | */ | 3314 | */ |
3315 | down_write(&EXT4_I(inode)->i_data_sem); | 3315 | down_read(&EXT4_I(inode)->i_data_sem); |
3316 | error = ext4_ext_walk_space(inode, start_blk, len_blks, | 3316 | error = ext4_ext_walk_space(inode, start_blk, len_blks, |
3317 | ext4_ext_fiemap_cb, fieinfo); | 3317 | ext4_ext_fiemap_cb, fieinfo); |
3318 | up_write(&EXT4_I(inode)->i_data_sem); | 3318 | up_read(&EXT4_I(inode)->i_data_sem); |
3319 | } | 3319 | } |
3320 | 3320 | ||
3321 | return error; | 3321 | return error; |