aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2018-06-26 20:59:18 -0400
committerAndreas Gruenbacher <agruenba@redhat.com>2018-07-24 18:08:40 -0400
commit1d45bb7f9d2a5cbae1e5d9a5f72adad84db4d318 (patch)
treec739c8934de8817353140b42e9dc3d37df9a81d4
parent0ed91eca1130e6c0fe66e01fa6ea92965e81900c (diff)
gfs2: Use iomap for stuffed direct I/O reads
Remove the fallback code from direct to buffered I/O for stuffed reads. For stuffed writes, we must keep the fallback code: the deferred glock we are holding under direct I/O doesn't allow to write to the inode or change the file size. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Bob Peterson <rpeterso@redhat.com>
-rw-r--r--fs/gfs2/file.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 6d895d39158a..08369c6cd127 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -706,14 +706,8 @@ static ssize_t gfs2_file_direct_read(struct kiocb *iocb, struct iov_iter *to)
706 if (ret) 706 if (ret)
707 goto out_uninit; 707 goto out_uninit;
708 708
709 /* fall back to buffered I/O for stuffed files */
710 ret = -ENOTBLK;
711 if (gfs2_is_stuffed(ip))
712 goto out;
713
714 ret = iomap_dio_rw(iocb, to, &gfs2_iomap_ops, NULL); 709 ret = iomap_dio_rw(iocb, to, &gfs2_iomap_ops, NULL);
715 710
716out:
717 gfs2_glock_dq(&gh); 711 gfs2_glock_dq(&gh);
718out_uninit: 712out_uninit:
719 gfs2_holder_uninit(&gh); 713 gfs2_holder_uninit(&gh);