linux/fs/cifs
Pavel Shilovsky edef98ab18 CIFS: Fix read after write for files with read caching
commit 6dfbd84684 upstream.

When we have a READ lease for a file and have just issued a write
operation to the server we need to purge the cache and set oplock/lease
level to NONE to avoid reading stale data. Currently we do that
only if a write operation succedeed thus not covering cases when
a request was sent to the server but a negative error code was
returned later for some other reasons (e.g. -EIOCBQUEUED or -EINTR).
Fix this by turning off caching regardless of the error code being
returned.

The patches fixes generic tests 075 and 112 from the xfs-tests.

Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-07-09 22:04:12 +01:00
..
asn1.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
cache.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
cifs_debug.c smb3: allow stats which track session and share reconnects to be reset 2019-02-11 17:53:40 +00:00
cifs_debug.h cifs: Ratelimit kernel log messages 2016-02-03 10:25:06 +00:00
cifs_dfs_ref.c cifs: fix composing of mount options for DFS referrals 2013-05-24 13:08:31 -05:00
cifs_fs_sb.h fs/cifs: make share unaccessible at root level mountable 2017-10-12 15:28:20 +01:00
cifs_spnego.c smb3: on kerberos mount if server doesn't specify auth type use krb5 2019-02-11 17:53:45 +00:00
cifs_spnego.h [CIFS] Rename three structures to avoid camel case 2011-05-27 04:34:02 +00:00
cifs_unicode.c [CIFS] fix mount failure with broken pathnames when smb3 mount with mapchars option 2014-06-24 08:10:24 -05:00
cifs_unicode.h cifs: add new case-insensitive conversion routines that are based on wchar_t's 2013-09-08 14:38:05 -05:00
cifs_uniupr.h cifs: correction of unicode header files 2010-08-20 00:46:42 +00:00
cifsacl.c [CIFS] Fix cifsacl mounts over smb2 to not call cifs 2014-02-10 14:08:16 -06:00
cifsacl.h cifs: fix SID binary to string conversion 2012-12-11 11:48:49 -06:00
cifsencrypt.c CIFS: zero sensitive data when freeing 2018-06-16 22:22:01 +01:00
cifsfs.c smb3: fill in statfs fsid and correct namelen 2018-12-16 22:08:39 +00:00
cifsfs.h Fix cifs_uniqueid_to_ino_t() function for s390x 2016-03-24 10:00:57 +00:00
cifsglob.h cifs: Fix stack out-of-bounds in smb{2,3}_create_lease_buf() 2018-11-20 18:05:36 +00:00
cifspdu.h cifs: Use data structures to compute NTLMv2 response offsets 2013-11-11 16:58:11 -06:00
cifsproto.h cifs: Fix use after free of a mid_q_entry 2018-11-20 18:05:35 +00:00
cifssmb.c cifs: Fix infinite loop when using hard mount option 2018-11-20 18:05:36 +00:00
connect.c cifs: connect to servername instead of IP for IPC$ share 2018-12-16 22:09:00 +00:00
dir.c cifs: Fix separator when building path from dentry 2019-02-11 17:54:21 +00:00
dns_resolve.c cifs: fix composing of mount options for DFS referrals 2013-05-24 13:08:31 -05:00
dns_resolve.h DNS: Separate out CIFS DNS Resolver code 2010-08-05 17:17:51 +00:00
export.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
file.c CIFS: Fix read after write for files with read caching 2019-07-09 22:04:12 +01:00
fscache.c NFS client updates for Linux 3.13 2013-11-08 05:57:46 +09:00
fscache.h CIFS: FS-Cache: Uncache unread pages in cifs_readpages() before freeing them 2013-09-18 10:17:03 -05:00
inode.c smb3: do not attempt cifs operation in smb3 query info error path 2019-02-11 17:53:40 +00:00
ioctl.c CIFS: fix type confusion in copy offload ioctl 2015-10-06 11:52:27 +01:00
Kconfig [CIFS] SMB3 Signing enablement 2013-06-26 23:45:05 -05:00
link.c SMB3: Fix oops when creating symlinks on smb3 2014-10-05 13:41:04 -07:00
Makefile cifs: add new case-insensitive conversion routines that are based on wchar_t's 2013-09-08 14:38:05 -05:00
misc.c CIFS: zero sensitive data when freeing 2018-06-16 22:22:01 +01:00
netmisc.c cifs: small underflow in cnvrtDosUnixTm() 2017-08-26 02:14:44 +01:00
nterr.c CIFS: Rename 7 error codes to NT_ style 2012-07-24 10:25:10 -05:00
nterr.h CIFS: Rename 7 error codes to NT_ style 2012-07-24 10:25:10 -05:00
ntlmssp.h cifs: dynamic allocation of ntlmssp blob 2016-08-22 22:38:20 +01:00
readdir.c cifs: prevent integer overflow in nxt_dir_entry() 2018-12-16 22:09:17 +00:00
rfc1002pdu.h [CIFS] whitespace cleanup 2007-06-05 18:30:44 +00:00
sess.c CIFS: Enable encryption during session setup phase 2019-04-04 16:14:12 +01:00
smb1ops.c cifs: Fix use after free of a mid_q_entry 2018-11-20 18:05:35 +00:00
smb2file.c cifs: Fix potential OOB access of lock element array 2019-05-02 21:41:19 +01:00
smb2glob.h cifs: Limit the overall credit acquired 2017-02-23 03:54:12 +00:00
smb2inode.c Do not send SMB3 SET_INFO request if nothing is changing 2017-02-23 03:54:13 +00:00
smb2maperror.c CIFS: Fix error mapping for SMB2_LOCK command which caused OFD lock problem 2019-04-04 16:14:05 +01:00
smb2misc.c CIFS: Do not reset lease state to NONE on lease break 2019-07-09 22:04:11 +01:00
smb2ops.c CIFS: Do not reset lease state to NONE on lease break 2019-07-09 22:04:11 +01:00
smb2pdu.c CIFS: Do not consider -ENODATA as stat failure for reads 2019-05-02 21:41:32 +01:00
smb2pdu.h smb3: fill in statfs fsid and correct namelen 2018-12-16 22:08:39 +00:00
smb2proto.h CIFS: Handle mismatched open calls 2017-07-18 18:40:32 +01:00
smb2status.h CIFS: Add SMB2 status codes 2012-07-24 10:25:13 -05:00
smb2transport.c cifs: Fix use after free of a mid_q_entry 2018-11-20 18:05:35 +00:00
smbencrypt.c [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg 2013-05-04 22:17:23 -05:00
smberr.h cifs: map NT_STATUS_ERROR_WRITE_PROTECTED to -EROFS 2010-08-02 12:40:40 +00:00
smbfsctl.h Check SMB3 dialects against downgrade attacks 2013-11-19 23:52:54 -06:00
transport.c CIFS: Do not hide EINTR after sending network packets 2019-05-02 21:41:18 +01:00
winucase.c [CIFS] quiet sparse compile warning 2013-09-08 14:54:24 -05:00
xattr.c retrieving CIFS ACLs when mounted with SMB2 fails dropping session 2014-02-07 11:08:17 -06:00