Skip to content

Commit 1013e76

Browse files
committed
SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags
Signed-off-by: Steve French <[email protected]> CC: Stable <[email protected]> Reviewed-by: Ronnie Sahlberg <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
1 parent 6e70e26 commit 1013e76

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fs/cifs/file.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
224224
if (backup_cred(cifs_sb))
225225
create_options |= CREATE_OPEN_BACKUP_INTENT;
226226

227+
/* O_SYNC also has bit for O_DSYNC so following check picks up either */
228+
if (f_flags & O_SYNC)
229+
create_options |= CREATE_WRITE_THROUGH;
230+
231+
if (f_flags & O_DIRECT)
232+
create_options |= CREATE_NO_BUFFER;
233+
227234
oparms.tcon = tcon;
228235
oparms.cifs_sb = cifs_sb;
229236
oparms.desired_access = desired_access;

0 commit comments

Comments
 (0)