Skip to content
Commit 2eacc0ac authored by Steve French's avatar Steve French Committed by Greg Kroah-Hartman
Browse files

smb3: do not error on fsync when readonly

[ Upstream commit 71e6864e

 ]

Linux allows doing a flush/fsync on a file open for read-only,
but the protocol does not allow that.  If the file passed in
on the flush is read-only try to find a writeable handle for
the same inode, if that is not possible skip sending the
fsync call to the server to avoid breaking the apps.

Reported-by: default avatarJulian Sikorski <belegdol@gmail.com>
Tested-by: default avatarJulian Sikorski <belegdol@gmail.com>
Suggested-by: default avatarJeremy Allison <jra@samba.org>
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 51be334d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment