diff options
author | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2020-09-24 18:39:09 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:17:59 +0200 |
commit | e3c57805f8f2215a1586741009111b92930cc6ac (patch) | |
tree | 61a50eb0198136eeb8a1e44ee11f180173fe30c5 /fs/btrfs/inode.c | |
parent | fs: remove no longer used dio_end_io() (diff) | |
download | linux-e3c57805f8f2215a1586741009111b92930cc6ac.tar.xz linux-e3c57805f8f2215a1586741009111b92930cc6ac.zip |
btrfs: remove BTRFS_INODE_READDIO_NEED_LOCK
Since we now perform direct reads using i_rwsem, we can remove this
inode flag used to co-ordinate unlocked reads.
The truncate call takes i_rwsem. This means it is correctly synchronized
with concurrent direct reads.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <jth@kernel.org>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/inode.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d526833b5ec0..36efed0a24de 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4844,10 +4844,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) truncate_setsize(inode, newsize); - /* Disable nonlocked read DIO to avoid the endless truncate */ - btrfs_inode_block_unlocked_dio(BTRFS_I(inode)); inode_dio_wait(inode); - btrfs_inode_resume_unlocked_dio(BTRFS_I(inode)); ret = btrfs_truncate(inode, newsize == oldsize); if (ret && inode->i_nlink) { |