Commit 3b47fd5c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'nfs-for-5.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfix from Trond Myklebust:
 "Regression fix inode fileid checks in attribute revalidation code"

* tag 'nfs-for-5.3-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: Fix inode fileid checks in attribute revalidation code
parents 089cf7f6 eb3d8f42
...@@ -1403,11 +1403,12 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat ...@@ -1403,11 +1403,12 @@ static int nfs_check_inode_attributes(struct inode *inode, struct nfs_fattr *fat
if (NFS_PROTO(inode)->have_delegation(inode, FMODE_READ)) if (NFS_PROTO(inode)->have_delegation(inode, FMODE_READ))
return 0; return 0;
/* No fileid? Just exit */ if (!(fattr->valid & NFS_ATTR_FATTR_FILEID)) {
if (!(fattr->valid & NFS_ATTR_FATTR_FILEID)) /* Only a mounted-on-fileid? Just exit */
return 0; if (fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID)
return 0;
/* Has the inode gone and changed behind our back? */ /* Has the inode gone and changed behind our back? */
if (nfsi->fileid != fattr->fileid) { } else if (nfsi->fileid != fattr->fileid) {
/* Is this perhaps the mounted-on fileid? */ /* Is this perhaps the mounted-on fileid? */
if ((fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID) && if ((fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID) &&
nfsi->fileid == fattr->mounted_on_fileid) nfsi->fileid == fattr->mounted_on_fileid)
...@@ -1807,11 +1808,12 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr) ...@@ -1807,11 +1808,12 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
nfs_display_fhandle_hash(NFS_FH(inode)), nfs_display_fhandle_hash(NFS_FH(inode)),
atomic_read(&inode->i_count), fattr->valid); atomic_read(&inode->i_count), fattr->valid);
/* No fileid? Just exit */ if (!(fattr->valid & NFS_ATTR_FATTR_FILEID)) {
if (!(fattr->valid & NFS_ATTR_FATTR_FILEID)) /* Only a mounted-on-fileid? Just exit */
return 0; if (fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID)
return 0;
/* Has the inode gone and changed behind our back? */ /* Has the inode gone and changed behind our back? */
if (nfsi->fileid != fattr->fileid) { } else if (nfsi->fileid != fattr->fileid) {
/* Is this perhaps the mounted-on fileid? */ /* Is this perhaps the mounted-on fileid? */
if ((fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID) && if ((fattr->valid & NFS_ATTR_FATTR_MOUNTED_ON_FILEID) &&
nfsi->fileid == fattr->mounted_on_fileid) nfsi->fileid == fattr->mounted_on_fileid)
......
Markdown is supported
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