mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
@@ -8447,7 +8447,7 @@ static ssize_t btrfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter,
|
||||
* not unlock the i_mutex at this case.
|
||||
*/
|
||||
if (offset + count <= inode->i_size) {
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
inode_unlock(inode);
|
||||
relock = true;
|
||||
}
|
||||
ret = btrfs_delalloc_reserve_space(inode, offset, count);
|
||||
@@ -8504,7 +8504,7 @@ out:
|
||||
if (wakeup)
|
||||
inode_dio_end(inode);
|
||||
if (relock)
|
||||
mutex_lock(&inode->i_mutex);
|
||||
inode_lock(inode);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user