Skip to content

Commit 4fad37d

Browse files
committed
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
2 parents fd574a2 + e57f9af commit 4fad37d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/gfs2/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,10 +899,10 @@ static ssize_t gfs2_file_direct_write(struct kiocb *iocb, struct iov_iter *from,
899899
ret = gfs2_glock_nq(gh);
900900
if (ret)
901901
goto out_uninit;
902-
retry_under_glock:
903902
/* Silently fall back to buffered I/O when writing beyond EOF */
904903
if (iocb->ki_pos + iov_iter_count(from) > i_size_read(&ip->i_inode))
905904
goto out;
905+
retry_under_glock:
906906

907907
from->nofault = true;
908908
ret = iomap_dio_rw(iocb, from, &gfs2_iomap_ops, NULL,

0 commit comments

Comments
 (0)