Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69299
b: refs/heads/master
c: 40d2470
h: refs/heads/master
i:
  69297: 8234e8d
  69295: ca69f21
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 9, 2007
1 parent 32f3287 commit 7fb796a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9e08a3c5aec5b745e844328bcbc16458b6118faf
refs/heads/master: 40d24704091c8a29a4c99d25670f1996749aea6f
10 changes: 9 additions & 1 deletion trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,11 +876,19 @@ int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr)
{
struct nfs_inode *nfsi = NFS_I(inode);

if (fattr->valid & NFS_ATTR_FATTR)
if (fattr->valid & NFS_ATTR_FATTR) {
if (S_ISDIR(inode->i_mode)) {
spin_lock(&inode->i_lock);
nfsi->cache_validity |= NFS_INO_INVALID_DATA;
spin_unlock(&inode->i_lock);
}
return nfs_refresh_inode(inode, fattr);
}

spin_lock(&inode->i_lock);
nfsi->cache_validity |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE;
if (S_ISDIR(inode->i_mode))
nfsi->cache_validity |= NFS_INO_INVALID_DATA;
spin_unlock(&inode->i_lock);
return 0;
}
Expand Down
10 changes: 4 additions & 6 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,10 @@ static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo)
struct nfs_inode *nfsi = NFS_I(dir);

spin_lock(&dir->i_lock);
if (cinfo->after != nfsi->change_attr) {
nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA;
if (!cinfo->atomic || cinfo->before != nfsi->change_attr)
nfsi->cache_change_attribute = jiffies;
nfsi->change_attr = cinfo->after;
}
nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA;
if (!cinfo->atomic || cinfo->before != nfsi->change_attr)
nfsi->cache_change_attribute = jiffies;
nfsi->change_attr = cinfo->after;
spin_unlock(&dir->i_lock);
}

Expand Down

0 comments on commit 7fb796a

Please sign in to comment.