Patch "staging: lustre: llite: don't invoke direct_IO for the EOF case" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
staging: lustre: llite: don't invoke direct_IO for the EOF case
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
staging-lustre-llite-don-t-invoke-direct_io-for-the-eof-case.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Nov 6 10:07:35 CET 2017
From: Yang Sheng <[email protected]>
Date: Sat, 7 Oct 2017 22:36:54 +0000
Subject: staging: lustre: llite: don't invoke direct_IO for the EOF case
From: Yang Sheng <[email protected]>
[ Upstream commit 77759771fb95420d23876cb104ab65c022613325 ]
The function generic_file_read_iter() does not check EOF before invoke direct_IO callback. So we have to check it ourselves.
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8969
Reviewed-on: https://review.whamcloud.com/24552
--- drivers/staging/lustre/lustre/llite/rw26.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/staging/lustre/lustre/llite/rw26.c +4 -0
@@ -354,6 +354,10 @@ static ssize_t ll_direct_IO_26(struct kiif (!lli->lli_has_smd)return -EBADF ; +/* Check EOF by ourselves */ +if (iov_iter_rw (iter) ==READ && file_offset >=i_size_read (inode)) +return 0 ; +/* FIXME: io smaller than PAGE_SIZE is broken on ia64 ??? */ if ((file_offset & ~PAGE_MASK ) || (count & ~PAGE_MASK ))return -EINVAL ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/staging-lustre-llite-don-t-invoke-direct_io-for-the-eof-case.patch