NFS: Fix post-op attribute revalidation...
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 3 Dec 2005 20:20:17 +0000 (15:20 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 3 Dec 2005 20:20:17 +0000 (15:20 -0500)
  - Missing nfs_mark_for_revalidate in nfs_proc_link()
  - Missing nfs_mark_for_revalidate in nfs_rename()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c
fs/nfs/proc.c

index 7370583b61e59e4fe685cac08ccb143e1f168e56..c0d1a214572ce9e2a2b804b7fee7eab44e4963ff 100644 (file)
@@ -1287,6 +1287,7 @@ dentry->d_parent->d_name.name, dentry->d_name.name);
                nfs_begin_data_update(dentry->d_inode);
                error = NFS_PROTO(dir)->rename(dir, &dentry->d_name,
                                dir, &qsilly);
+               nfs_mark_for_revalidate(dentry->d_inode);
                nfs_end_data_update(dentry->d_inode);
        } else
                error = NFS_PROTO(dir)->rename(dir, &dentry->d_name,
@@ -1334,6 +1335,7 @@ static int nfs_safe_remove(struct dentry *dentry)
                /* The VFS may want to delete this inode */
                if (error == 0)
                        inode->i_nlink--;
+               nfs_mark_for_revalidate(inode);
                nfs_end_data_update(inode);
        } else
                error = NFS_PROTO(dir)->remove(dir, &dentry->d_name);
@@ -1556,6 +1558,7 @@ go_ahead:
        nfs_begin_data_update(old_inode);
        error = NFS_PROTO(old_dir)->rename(old_dir, &old_dentry->d_name,
                                           new_dir, &new_dentry->d_name);
+       nfs_mark_for_revalidate(old_inode);
        nfs_end_data_update(old_inode);
        nfs_end_data_update(new_dir);
        nfs_end_data_update(old_dir);
index a48a003242c006c94f8823fdc081d3c03289289e..e1e3ca5d746be50946fd1a833402765f511e436a 100644 (file)
@@ -375,6 +375,7 @@ nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
 
        dprintk("NFS call  link %s\n", name->name);
        status = rpc_call(NFS_CLIENT(inode), NFSPROC_LINK, &arg, NULL, 0);
+       nfs_mark_for_revalidate(inode);
        nfs_mark_for_revalidate(dir);
        dprintk("NFS reply link: %d\n", status);
        return status;