staging: lustre: llite: don't invoke direct_IO for the EOF case
authorYang Sheng <yang.sheng@intel.com>
Sat, 7 Oct 2017 22:36:54 +0000 (22:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2017 09:08:36 +0000 (10:08 +0100)
commita513df5968ad2bb58c783979a541c9159b00e44f
tree0d79dd62b186881674662e7870816bb9236b1095
parentc3f0c2c140005fc041eb6eb5364af46d5ca47e27
staging: lustre: llite: don't invoke direct_IO for the EOF case

[ 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.

Signed-off-by: Yang Sheng <yang.sheng@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8969
Reviewed-on: https://review.whamcloud.com/24552
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/rw26.c