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/inode.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/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1b79dc9b12e4..e28f3d4691af 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -8447,7 +8447,7 @@ static ssize_t btrfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter, | |||
8447 | * not unlock the i_mutex at this case. | 8447 | * not unlock the i_mutex at this case. |
8448 | */ | 8448 | */ |
8449 | if (offset + count <= inode->i_size) { | 8449 | if (offset + count <= inode->i_size) { |
8450 | mutex_unlock(&inode->i_mutex); | 8450 | inode_unlock(inode); |
8451 | relock = true; | 8451 | relock = true; |
8452 | } | 8452 | } |
8453 | ret = btrfs_delalloc_reserve_space(inode, offset, count); | 8453 | ret = btrfs_delalloc_reserve_space(inode, offset, count); |
@@ -8504,7 +8504,7 @@ out: | |||
8504 | if (wakeup) | 8504 | if (wakeup) |
8505 | inode_dio_end(inode); | 8505 | inode_dio_end(inode); |
8506 | if (relock) | 8506 | if (relock) |
8507 | mutex_lock(&inode->i_mutex); | 8507 | inode_lock(inode); |
8508 | 8508 | ||
8509 | return ret; | 8509 | return ret; |
8510 | } | 8510 | } |