summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-04-07 02:03:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-27 15:38:56 +0300
commit213330bafd021eaa378d4aa91d40ba2736abd4de (patch)
treef157a4897323e1416f2ea44fac491e838e9fa52d /fs/cifs
parent6085e24fd972f36d004c05fffe226ffc61809c3a (diff)
downloadlinux-213330bafd021eaa378d4aa91d40ba2736abd4de.tar.xz
cifs: Check the IOCB_DIRECT flag, not O_DIRECT
[ Upstream commit 994fd530a512597ffcd713b0f6d5bc916c5698f0 ] Use the IOCB_DIRECT indicator flag on the I/O context rather than checking to see if the file was opened O_DIRECT. Signed-off-by: David Howells <dhowells@redhat.com> cc: Steve French <sfrench@samba.org> cc: Shyam Prasad N <nspmangalore@gmail.com> cc: Rohith Surabattula <rohiths.msft@gmail.com> cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifsfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 29a019cf1d5f..8f8d281e3151 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -936,7 +936,7 @@ cifs_loose_read_iter(struct kiocb *iocb, struct iov_iter *iter)
ssize_t rc;
struct inode *inode = file_inode(iocb->ki_filp);
- if (iocb->ki_filp->f_flags & O_DIRECT)
+ if (iocb->ki_flags & IOCB_DIRECT)
return cifs_user_readv(iocb, iter);
rc = cifs_revalidate_mapping(inode);