summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-04-26 11:17:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-04-26 11:17:18 -0700
commit4fad37d595b9d9a2996467d780cb2e7a1b08b2c0 (patch)
tree4039f3c0394eb6f30729080645983603a288ab49 /fs
parentfd574a2f841c8f07b20e5b55391e0af5d39d82ff (diff)
parente57f9af73d6b0ffb5f1aeaf6cec9a751dd8535c9 (diff)
Merge tag 'gfs2-v5.18-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
Pull gfs2 fix from Andreas Gruenbacher: - Only re-check for direct I/O writes past the end of the file after re-acquiring the inode glock. * tag 'gfs2-v5.18-rc4-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Don't re-check for write past EOF unnecessarily
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 22b41acfbbc3..8d889235afcd 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -899,10 +899,10 @@ retry:
ret = gfs2_glock_nq(gh);
if (ret)
goto out_uninit;
-retry_under_glock:
/* Silently fall back to buffered I/O when writing beyond EOF */
if (iocb->ki_pos + iov_iter_count(from) > i_size_read(&ip->i_inode))
goto out;
+retry_under_glock:
from->nofault = true;
ret = iomap_dio_rw(iocb, from, &gfs2_iomap_ops, NULL,