|
@@ -467,6 +467,14 @@ int cifs_open(struct inode *inode, struct file *file)
|
|
cifs_dbg(FYI, "inode = 0x%p file flags are 0x%x for %s\n",
|
|
cifs_dbg(FYI, "inode = 0x%p file flags are 0x%x for %s\n",
|
|
inode, file->f_flags, full_path);
|
|
inode, file->f_flags, full_path);
|
|
|
|
|
|
|
|
+ if (file->f_flags & O_DIRECT &&
|
|
|
|
+ cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO) {
|
|
|
|
+ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_BRL)
|
|
|
|
+ file->f_op = &cifs_file_direct_nobrl_ops;
|
|
|
|
+ else
|
|
|
|
+ file->f_op = &cifs_file_direct_ops;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (server->oplocks)
|
|
if (server->oplocks)
|
|
oplock = REQ_OPLOCK;
|
|
oplock = REQ_OPLOCK;
|
|
else
|
|
else
|