Skip to content

Commit 994fd53

Browse files
dhowellssmfrench
authored andcommitted
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>
1 parent 5a5dcfd commit 994fd53

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/cifs/cifsfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ cifs_loose_read_iter(struct kiocb *iocb, struct iov_iter *iter)
944944
ssize_t rc;
945945
struct inode *inode = file_inode(iocb->ki_filp);
946946

947-
if (iocb->ki_filp->f_flags & O_DIRECT)
947+
if (iocb->ki_flags & IOCB_DIRECT)
948948
return cifs_user_readv(iocb, iter);
949949

950950
rc = cifs_revalidate_mapping(inode);

0 commit comments

Comments
 (0)