Commit 0b581701 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: make btrfs_inode_resume_unlocked_dio take btrfs_inode

Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent abcefb1e
...@@ -317,11 +317,10 @@ static inline void btrfs_inode_block_unlocked_dio(struct btrfs_inode *inode) ...@@ -317,11 +317,10 @@ static inline void btrfs_inode_block_unlocked_dio(struct btrfs_inode *inode)
smp_mb(); smp_mb();
} }
static inline void btrfs_inode_resume_unlocked_dio(struct inode *inode) static inline void btrfs_inode_resume_unlocked_dio(struct btrfs_inode *inode)
{ {
smp_mb__before_atomic(); smp_mb__before_atomic();
clear_bit(BTRFS_INODE_READDIO_NEED_LOCK, clear_bit(BTRFS_INODE_READDIO_NEED_LOCK, &inode->runtime_flags);
&BTRFS_I(inode)->runtime_flags);
} }
static inline void btrfs_print_data_csum_error(struct btrfs_inode *inode, static inline void btrfs_print_data_csum_error(struct btrfs_inode *inode,
......
...@@ -5004,7 +5004,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) ...@@ -5004,7 +5004,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)
/* 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(BTRFS_I(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(BTRFS_I(inode));
ret = btrfs_truncate(inode); ret = btrfs_truncate(inode);
if (ret && inode->i_nlink) { if (ret && inode->i_nlink) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment