diff options
author | Steve French <smfrench@gmail.com> | 2017-09-22 08:40:27 +0200 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2017-09-23 02:47:17 +0200 |
commit | 1013e760d10e614dc10b5624ce9fc41563ba2e65 (patch) | |
tree | c4c8189b7e4fb4b972c0f41af402fbb558d4ff14 /fs/cifs/file.c | |
parent | SMB3: handle new statx fields (diff) | |
download | linux-1013e760d10e614dc10b5624ce9fc41563ba2e65.tar.xz linux-1013e760d10e614dc10b5624ce9fc41563ba2e65.zip |
SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags
Signed-off-by: Steve French <smfrench@gmail.com>
CC: Stable <stable@vger.kernel.org>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to '')
-rw-r--r-- | fs/cifs/file.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 822311919163..92fdf9c35de2 100644 --- 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; |