mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00:00
an important fix to address recent netfs regression (data corruption)
-----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmZIewwACgkQiiy9cAdy T1H5VwwAokoVoYvrlPQO4CNwMlXmzlTLYVi74qLubbRcKmltMzzHRHRH7JZtu9ao K1GRvVMMUIJoTG6tGJg9B3x0hmosyZ4gzVywc87bXyM7vpOCsvOQqA0xmWxN/Hxx AuiPi4Ttjy6TiWxVWDb77BOnGGGnqVgmjGS2LS/29RetOz2NLYCuDooo6S2qyVWn d8URgHzJbAcuBQVbhkPXge32I2ojHSpPktEcqi6MK2Em9HItMVNv3HK1NIYYo5kf T2D8G62xWFjQHgHGgEh9CNQrWocg0CLux/oPA/zVs1p2XRvJv41EO/x09cieFBPU BQgbORLo4e45YyN5OOClqCVwAU3wrWU4ADs1Z8SXid8Jc4rqgjlUYt47T4hYKVVW p6Airoz2SEz5d+/THQ0aIlYBBGFj2Qd22ufJdUi9NbnH/gGchuJzYAi7XJc6i0tn 6N9bK8Tul4p353B+0j+zajrnH2sGWTAUv6Ir+cqRhP2/ma8ZUDofcaid5OPf/js1 JxTnRB6z =UJ5I -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
0450d2083b
@ -2465,7 +2465,8 @@ int
|
|||||||
cifs_revalidate_mapping(struct inode *inode)
|
cifs_revalidate_mapping(struct inode *inode)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
unsigned long *flags = &CIFS_I(inode)->flags;
|
struct cifsInodeInfo *cifs_inode = CIFS_I(inode);
|
||||||
|
unsigned long *flags = &cifs_inode->flags;
|
||||||
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
|
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
|
||||||
|
|
||||||
/* swapfiles are not supposed to be shared */
|
/* swapfiles are not supposed to be shared */
|
||||||
@ -2482,6 +2483,7 @@ cifs_revalidate_mapping(struct inode *inode)
|
|||||||
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RW_CACHE)
|
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_RW_CACHE)
|
||||||
goto skip_invalidate;
|
goto skip_invalidate;
|
||||||
|
|
||||||
|
cifs_inode->netfs.zero_point = cifs_inode->netfs.remote_i_size;
|
||||||
rc = filemap_invalidate_inode(inode, true, 0, LLONG_MAX);
|
rc = filemap_invalidate_inode(inode, true, 0, LLONG_MAX);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
cifs_dbg(VFS, "%s: invalidate inode %p failed with rc %d\n",
|
cifs_dbg(VFS, "%s: invalidate inode %p failed with rc %d\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user