diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2022-03-24 22:40:20 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2022-03-24 23:40:36 +0100 |
commit | 11661835f90153bdfc5325e550d2b72d0f47cb3e (patch) | |
tree | 4177d09509443aade9d2df6f86fbabdc3ad367fa /fs/gfs2/file.c | |
parent | 46f3e0421ccb5474b5c006b0089b9dfd42534bb6 (diff) | |
download | linux-stable-11661835f90153bdfc5325e550d2b72d0f47cb3e.tar.gz linux-stable-11661835f90153bdfc5325e550d2b72d0f47cb3e.tar.bz2 linux-stable-11661835f90153bdfc5325e550d2b72d0f47cb3e.zip |
gfs2: Remove dead code in gfs2_file_read_iter
Function iomap_dio_rw() only returns -ENOTBLK for write requests and
gfs2_file_direct_read() no longer returns -ENOTBLK since commit
1d45bb7f9d2a5 ("gfs2: Use iomap for stuffed direct I/O reads"), so there
is no need to check for -ENOTBLK in gfs2_file_read_iter() anymore.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r-- | fs/gfs2/file.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 19a038bc33bc..edc588465a4b 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -951,12 +951,9 @@ static ssize_t gfs2_file_read_iter(struct kiocb *iocb, struct iov_iter *to) * and retry. */ - if (iocb->ki_flags & IOCB_DIRECT) { - ret = gfs2_file_direct_read(iocb, to, &gh); - if (likely(ret != -ENOTBLK)) - return ret; - iocb->ki_flags &= ~IOCB_DIRECT; - } + if (iocb->ki_flags & IOCB_DIRECT) + return gfs2_file_direct_read(iocb, to, &gh); + pagefault_disable(); iocb->ki_flags |= IOCB_NOIO; ret = generic_file_read_iter(iocb, to); |