提交 abcefb1e 编写于 作者: N Nikolay Borisov 提交者: David Sterba

btrfs: make btrfs_inode_block_unlocked_dio take btrfs_inode

Signed-off-by: NNikolay Borisov <nborisov@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 cef415af
...@@ -311,9 +311,9 @@ struct btrfs_dio_private { ...@@ -311,9 +311,9 @@ struct btrfs_dio_private {
* to grab i_mutex. It is used to avoid the endless truncate due to * to grab i_mutex. It is used to avoid the endless truncate due to
* nonlocked dio read. * nonlocked dio read.
*/ */
static inline void btrfs_inode_block_unlocked_dio(struct inode *inode) static inline void btrfs_inode_block_unlocked_dio(struct btrfs_inode *inode)
{ {
set_bit(BTRFS_INODE_READDIO_NEED_LOCK, &BTRFS_I(inode)->runtime_flags); set_bit(BTRFS_INODE_READDIO_NEED_LOCK, &inode->runtime_flags);
smp_mb(); smp_mb();
} }
......
...@@ -5002,7 +5002,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) ...@@ -5002,7 +5002,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)
truncate_setsize(inode, newsize); truncate_setsize(inode, newsize);
/* Disable nonlocked read DIO to avoid the end less truncate */ /* Disable nonlocked read DIO to avoid the end less truncate */
btrfs_inode_block_unlocked_dio(inode); btrfs_inode_block_unlocked_dio(BTRFS_I(inode));
inode_dio_wait(inode); inode_dio_wait(inode);
btrfs_inode_resume_unlocked_dio(inode); btrfs_inode_resume_unlocked_dio(inode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册