diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-02-20 06:51:11 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-28 05:30:12 -0500 |
commit | 0b581701d9771c55a908c612ca49850e6088fe08 (patch) | |
tree | 5c251b3276d81b96f8989297f6956888090f9f05 | |
parent | abcefb1eeeff04734a59b4dd3724abbf0688252c (diff) |
btrfs: make btrfs_inode_resume_unlocked_dio take btrfs_inode
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/btrfs_inode.h | 5 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index d84cf2b0c7b6..0c6baaba0651 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h | |||
@@ -317,11 +317,10 @@ static inline void btrfs_inode_block_unlocked_dio(struct btrfs_inode *inode) | |||
317 | smp_mb(); | 317 | smp_mb(); |
318 | } | 318 | } |
319 | 319 | ||
320 | static inline void btrfs_inode_resume_unlocked_dio(struct inode *inode) | 320 | static inline void btrfs_inode_resume_unlocked_dio(struct btrfs_inode *inode) |
321 | { | 321 | { |
322 | smp_mb__before_atomic(); | 322 | smp_mb__before_atomic(); |
323 | clear_bit(BTRFS_INODE_READDIO_NEED_LOCK, | 323 | clear_bit(BTRFS_INODE_READDIO_NEED_LOCK, &inode->runtime_flags); |
324 | &BTRFS_I(inode)->runtime_flags); | ||
325 | } | 324 | } |
326 | 325 | ||
327 | static inline void btrfs_print_data_csum_error(struct btrfs_inode *inode, | 326 | static inline void btrfs_print_data_csum_error(struct btrfs_inode *inode, |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 59b93a2369aa..596e5cb4bfa2 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -5004,7 +5004,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) | |||
5004 | /* Disable nonlocked read DIO to avoid the end less truncate */ | 5004 | /* Disable nonlocked read DIO to avoid the end less truncate */ |
5005 | btrfs_inode_block_unlocked_dio(BTRFS_I(inode)); | 5005 | btrfs_inode_block_unlocked_dio(BTRFS_I(inode)); |
5006 | inode_dio_wait(inode); | 5006 | inode_dio_wait(inode); |
5007 | btrfs_inode_resume_unlocked_dio(inode); | 5007 | btrfs_inode_resume_unlocked_dio(BTRFS_I(inode)); |
5008 | 5008 | ||
5009 | ret = btrfs_truncate(inode); | 5009 | ret = btrfs_truncate(inode); |
5010 | if (ret && inode->i_nlink) { | 5010 | if (ret && inode->i_nlink) { |