projects
/
wrapfs-4.13.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3c1243
)
SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags
author
Steve French
<smfrench@gmail.com>
Fri, 22 Sep 2017 06:40:27 +0000
(
01:40
-0500)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 5 Oct 2017 07:35:52 +0000
(09:35 +0200)
commit
1013e760d10e614dc10b5624ce9fc41563ba2e65
upstream.
Signed-off-by: Steve French <smfrench@gmail.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/file.c
patch
|
blob
|
history
diff --git
a/fs/cifs/file.c
b/fs/cifs/file.c
index a3badede1b32461081ea10ca4941e4b26a29ec5c..237c201d6d3e057eecb56537372ef0b7bbfdbd26 100644
(file)
--- a/
fs/cifs/file.c
+++ b/
fs/cifs/file.c
@@
-225,6
+225,13
@@
cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
if (backup_cred(cifs_sb))
create_options |= CREATE_OPEN_BACKUP_INTENT;
+ /* O_SYNC also has bit for O_DSYNC so following check picks up either */
+ if (f_flags & O_SYNC)
+ create_options |= CREATE_WRITE_THROUGH;
+
+ if (f_flags & O_DIRECT)
+ create_options |= CREATE_NO_BUFFER;
+
oparms.tcon = tcon;
oparms.cifs_sb = cifs_sb;
oparms.desired_access = desired_access;