Commit 5ba7cc48 authored by Trond Myklebust's avatar Trond Myklebust

NFS: Fix post-op attribute revalidation...

  - Missing nfs_mark_for_revalidate in nfs_proc_link()
  - Missing nfs_mark_for_revalidate in nfs_rename()
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent bb713d6d
...@@ -1287,6 +1287,7 @@ dentry->d_parent->d_name.name, dentry->d_name.name); ...@@ -1287,6 +1287,7 @@ dentry->d_parent->d_name.name, dentry->d_name.name);
nfs_begin_data_update(dentry->d_inode); nfs_begin_data_update(dentry->d_inode);
error = NFS_PROTO(dir)->rename(dir, &dentry->d_name, error = NFS_PROTO(dir)->rename(dir, &dentry->d_name,
dir, &qsilly); dir, &qsilly);
nfs_mark_for_revalidate(dentry->d_inode);
nfs_end_data_update(dentry->d_inode); nfs_end_data_update(dentry->d_inode);
} else } else
error = NFS_PROTO(dir)->rename(dir, &dentry->d_name, error = NFS_PROTO(dir)->rename(dir, &dentry->d_name,
...@@ -1334,6 +1335,7 @@ static int nfs_safe_remove(struct dentry *dentry) ...@@ -1334,6 +1335,7 @@ static int nfs_safe_remove(struct dentry *dentry)
/* The VFS may want to delete this inode */ /* The VFS may want to delete this inode */
if (error == 0) if (error == 0)
inode->i_nlink--; inode->i_nlink--;
nfs_mark_for_revalidate(inode);
nfs_end_data_update(inode); nfs_end_data_update(inode);
} else } else
error = NFS_PROTO(dir)->remove(dir, &dentry->d_name); error = NFS_PROTO(dir)->remove(dir, &dentry->d_name);
...@@ -1556,6 +1558,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1556,6 +1558,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
nfs_begin_data_update(old_inode); nfs_begin_data_update(old_inode);
error = NFS_PROTO(old_dir)->rename(old_dir, &old_dentry->d_name, error = NFS_PROTO(old_dir)->rename(old_dir, &old_dentry->d_name,
new_dir, &new_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(old_inode);
nfs_end_data_update(new_dir); nfs_end_data_update(new_dir);
nfs_end_data_update(old_dir); nfs_end_data_update(old_dir);
......
...@@ -375,6 +375,7 @@ nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) ...@@ -375,6 +375,7 @@ nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
dprintk("NFS call link %s\n", name->name); dprintk("NFS call link %s\n", name->name);
status = rpc_call(NFS_CLIENT(inode), NFSPROC_LINK, &arg, NULL, 0); status = rpc_call(NFS_CLIENT(inode), NFSPROC_LINK, &arg, NULL, 0);
nfs_mark_for_revalidate(inode);
nfs_mark_for_revalidate(dir); nfs_mark_for_revalidate(dir);
dprintk("NFS reply link: %d\n", status); dprintk("NFS reply link: %d\n", status);
return status; return status;
......
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