diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-22 15:40:57 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-22 18:04:28 -0500 |
commit | 5955102c9984fa081b2d570cfac75c97eecf8f3b (patch) | |
tree | a4744386eac4b916e847eb4eedfada158f6527b4 /fs/btrfs/scrub.c | |
parent | 57b8f112cfe6622ddddb8c2641206bb5fa8a112d (diff) |
wrappers for ->i_mutex access
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
inode_foo(inode) being mutex_foo(&inode->i_mutex).
Please, use those for access to ->i_mutex; over the coming cycle
->i_mutex will become rwsem, with ->lookup() done with it held
only shared.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/scrub.c')
-rw-r--r-- | fs/btrfs/scrub.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index b1a68530e911..92bf5ee732fb 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c | |||
@@ -4279,7 +4279,7 @@ static int copy_nocow_pages_for_inode(u64 inum, u64 offset, u64 root, | |||
4279 | return PTR_ERR(inode); | 4279 | return PTR_ERR(inode); |
4280 | 4280 | ||
4281 | /* Avoid truncate/dio/punch hole.. */ | 4281 | /* Avoid truncate/dio/punch hole.. */ |
4282 | mutex_lock(&inode->i_mutex); | 4282 | inode_lock(inode); |
4283 | inode_dio_wait(inode); | 4283 | inode_dio_wait(inode); |
4284 | 4284 | ||
4285 | physical_for_dev_replace = nocow_ctx->physical_for_dev_replace; | 4285 | physical_for_dev_replace = nocow_ctx->physical_for_dev_replace; |
@@ -4358,7 +4358,7 @@ next_page: | |||
4358 | } | 4358 | } |
4359 | ret = COPY_COMPLETE; | 4359 | ret = COPY_COMPLETE; |
4360 | out: | 4360 | out: |
4361 | mutex_unlock(&inode->i_mutex); | 4361 | inode_unlock(inode); |
4362 | iput(inode); | 4362 | iput(inode); |
4363 | return ret; | 4363 | return ret; |
4364 | } | 4364 | } |