summaryrefslogtreecommitdiff
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-09-16 09:53:59 -0500
committerFelipe Balbi <balbi@ti.com>2014-09-16 09:53:59 -0500
commit4cd41ffd27b6b775445ecfdb72b592b71d6b4a32 (patch)
tree61e8c51ed5b9fae163d2d54967ebda02805c0bfa /fs/cifs/file.c
parentd9152161b4bfd131a8253a5b9fcd8ba9b10277c4 (diff)
parent9e82bf014195d6f0054982c463575cdce24292be (diff)
downloadlinux-next-4cd41ffd27b6b775445ecfdb72b592b71d6b4a32.tar.gz
Merge tag 'v3.17-rc5' into next
Linux 3.17-rc5 Signed-off-by: Felipe Balbi <balbi@ti.com> Conflicts: Documentation/devicetree/bindings/usb/mxs-phy.txt drivers/usb/phy/phy-mxs-usb.c
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index d5fec92e0360..7c018a1c52f7 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -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",
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)
oplock = REQ_OPLOCK;
else