diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-27 22:12:43 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-27 22:12:43 -0400 |
commit | 6caf2c8276d371679a798058e8fdf49f5ff831a3 (patch) | |
tree | ff53620d5879644df543dcce2ce86db863dad21c /fs/nfs/nfs4proc.c | |
parent | 91ba2eeec5e8e86e054937eb3bf5aec5b22b1830 (diff) |
NFSv4: Add post-op attributes to nfs4_proc_rename()
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 04995e39e867..f96bc12c0fa0 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1685,13 +1685,20 @@ static int nfs4_proc_unlink_done(struct dentry *dir, struct rpc_task *task) | |||
1685 | static int _nfs4_proc_rename(struct inode *old_dir, struct qstr *old_name, | 1685 | static int _nfs4_proc_rename(struct inode *old_dir, struct qstr *old_name, |
1686 | struct inode *new_dir, struct qstr *new_name) | 1686 | struct inode *new_dir, struct qstr *new_name) |
1687 | { | 1687 | { |
1688 | struct nfs_server *server = NFS_SERVER(old_dir); | ||
1688 | struct nfs4_rename_arg arg = { | 1689 | struct nfs4_rename_arg arg = { |
1689 | .old_dir = NFS_FH(old_dir), | 1690 | .old_dir = NFS_FH(old_dir), |
1690 | .new_dir = NFS_FH(new_dir), | 1691 | .new_dir = NFS_FH(new_dir), |
1691 | .old_name = old_name, | 1692 | .old_name = old_name, |
1692 | .new_name = new_name, | 1693 | .new_name = new_name, |
1694 | .bitmask = server->attr_bitmask, | ||
1695 | }; | ||
1696 | struct nfs_fattr old_fattr, new_fattr; | ||
1697 | struct nfs4_rename_res res = { | ||
1698 | .server = server, | ||
1699 | .old_fattr = &old_fattr, | ||
1700 | .new_fattr = &new_fattr, | ||
1693 | }; | 1701 | }; |
1694 | struct nfs4_rename_res res = { }; | ||
1695 | struct rpc_message msg = { | 1702 | struct rpc_message msg = { |
1696 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENAME], | 1703 | .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_RENAME], |
1697 | .rpc_argp = &arg, | 1704 | .rpc_argp = &arg, |
@@ -1699,11 +1706,15 @@ static int _nfs4_proc_rename(struct inode *old_dir, struct qstr *old_name, | |||
1699 | }; | 1706 | }; |
1700 | int status; | 1707 | int status; |
1701 | 1708 | ||
1702 | status = rpc_call_sync(NFS_CLIENT(old_dir), &msg, 0); | 1709 | nfs_fattr_init(res.old_fattr); |
1710 | nfs_fattr_init(res.new_fattr); | ||
1711 | status = rpc_call_sync(server->client, &msg, 0); | ||
1703 | 1712 | ||
1704 | if (!status) { | 1713 | if (!status) { |
1705 | update_changeattr(old_dir, &res.old_cinfo); | 1714 | update_changeattr(old_dir, &res.old_cinfo); |
1715 | nfs_post_op_update_inode(old_dir, res.old_fattr); | ||
1706 | update_changeattr(new_dir, &res.new_cinfo); | 1716 | update_changeattr(new_dir, &res.new_cinfo); |
1717 | nfs_post_op_update_inode(new_dir, res.new_fattr); | ||
1707 | } | 1718 | } |
1708 | return status; | 1719 | return status; |
1709 | } | 1720 | } |