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:
@@ -4279,7 +4279,7 @@ static int copy_nocow_pages_for_inode(u64 inum, u64 offset, u64 root,
|
||||
return PTR_ERR(inode);
|
||||
|
||||
/* Avoid truncate/dio/punch hole.. */
|
||||
mutex_lock(&inode->i_mutex);
|
||||
inode_lock(inode);
|
||||
inode_dio_wait(inode);
|
||||
|
||||
physical_for_dev_replace = nocow_ctx->physical_for_dev_replace;
|
||||
@@ -4358,7 +4358,7 @@ next_page:
|
||||
}
|
||||
ret = COPY_COMPLETE;
|
||||
out:
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
inode_unlock(inode);
|
||||
iput(inode);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user