summaryrefslogtreecommitdiff
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-04-07 02:03:14 +0300
committerSteve French <stfrench@microsoft.com>2022-04-08 17:01:59 +0300
commit994fd530a512597ffcd713b0f6d5bc916c5698f0 (patch)
tree7e7a1a076f304ca1ff462eb6b6e3113018152c31 /fs/cifs/cifsfs.c
parent5a5dcfd1e8789053730908c96639151b4151c4d0 (diff)
downloadlinux-994fd530a512597ffcd713b0f6d5bc916c5698f0.tar.xz
cifs: Check the IOCB_DIRECT flag, not O_DIRECT
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>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-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 a47fa44b6d52..fb60b5410789 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -944,7 +944,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);