projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e1b85a
)
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:44:01 +0000
(09:44 +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
3925758
..
cf192f9
100644
(file)
--- a/
fs/cifs/file.c
+++ b/
fs/cifs/file.c
@@
-224,6
+224,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;