Skip to content

Commit 0450d20

Browse files
committed
Merge tag '6.10-rc-smb-fix' of git://git.samba.org/sfrench/cifs-2.6
Pull smb client fix from Steve French: "An important fix to address recent netfs regression (data corruption)" * tag '6.10-rc-smb-fix' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix data corruption in read after invalidate
2 parents 7991c92 + a395726 commit 0450d20

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/smb/client/inode.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -2465,7 +2465,8 @@ int
24652465
cifs_revalidate_mapping(struct inode *inode)
24662466
{
24672467
int rc;
2468-
unsigned long *flags = &CIFS_I(inode)->flags;
2468+
struct cifsInodeInfo *cifs_inode = CIFS_I(inode);
2469+
unsigned long *flags = &cifs_inode->flags;
24692470
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
24702471

24712472
/* swapfiles are not supposed to be shared */
@@ -2482,6 +2483,7 @@ cifs_revalidate_mapping(struct inode *inode)
24822483
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RW_CACHE)
24832484
goto skip_invalidate;
24842485

2486+
cifs_inode->netfs.zero_point = cifs_inode->netfs.remote_i_size;
24852487
rc = filemap_invalidate_inode(inode, true, 0, LLONG_MAX);
24862488
if (rc) {
24872489
cifs_dbg(VFS, "%s: invalidate inode %p failed with rc %d\n",

0 commit comments

Comments
 (0)