Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18a89a10 authored by Steve French's avatar Steve French Committed by Greg Kroah-Hartman
Browse files

SMB3: Don't ignore O_SYNC/O_DSYNC and O_DIRECT flags



commit 1013e760d10e614dc10b5624ce9fc41563ba2e65 upstream.

Signed-off-by: default avatarSteve French <smfrench@gmail.com>
Reviewed-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0e1b85a4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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;