diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-27 22:12:44 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-27 22:12:44 -0400 |
commit | 4f9838c7ecd14f31f701f64fa65ded132fc0db8a (patch) | |
tree | f3fee5b744efb072f44591208541554976bf41d7 /fs/nfs/nfs4proc.c | |
parent | 16e429596dec4d28e16812b3a9be27f18412c567 (diff) |
NFSv4: Add post-op attributes to NFSv4 write and commit callbacks.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index bab47c4cb41c..933e13b383f8 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2169,8 +2169,10 @@ nfs4_write_done(struct rpc_task *task) | |||
2169 | rpc_restart_call(task); | 2169 | rpc_restart_call(task); |
2170 | return; | 2170 | return; |
2171 | } | 2171 | } |
2172 | if (task->tk_status >= 0) | 2172 | if (task->tk_status >= 0) { |
2173 | renew_lease(NFS_SERVER(inode), data->timestamp); | 2173 | renew_lease(NFS_SERVER(inode), data->timestamp); |
2174 | nfs_post_op_update_inode(inode, data->res.fattr); | ||
2175 | } | ||
2174 | /* Call back common NFS writeback processing */ | 2176 | /* Call back common NFS writeback processing */ |
2175 | nfs_writeback_done(task); | 2177 | nfs_writeback_done(task); |
2176 | } | 2178 | } |
@@ -2186,6 +2188,7 @@ nfs4_proc_write_setup(struct nfs_write_data *data, int how) | |||
2186 | .rpc_cred = data->cred, | 2188 | .rpc_cred = data->cred, |
2187 | }; | 2189 | }; |
2188 | struct inode *inode = data->inode; | 2190 | struct inode *inode = data->inode; |
2191 | struct nfs_server *server = NFS_SERVER(inode); | ||
2189 | int stable; | 2192 | int stable; |
2190 | int flags; | 2193 | int flags; |
2191 | 2194 | ||
@@ -2197,6 +2200,8 @@ nfs4_proc_write_setup(struct nfs_write_data *data, int how) | |||
2197 | } else | 2200 | } else |
2198 | stable = NFS_UNSTABLE; | 2201 | stable = NFS_UNSTABLE; |
2199 | data->args.stable = stable; | 2202 | data->args.stable = stable; |
2203 | data->args.bitmask = server->attr_bitmask; | ||
2204 | data->res.server = server; | ||
2200 | 2205 | ||
2201 | data->timestamp = jiffies; | 2206 | data->timestamp = jiffies; |
2202 | 2207 | ||
@@ -2218,6 +2223,8 @@ nfs4_commit_done(struct rpc_task *task) | |||
2218 | rpc_restart_call(task); | 2223 | rpc_restart_call(task); |
2219 | return; | 2224 | return; |
2220 | } | 2225 | } |
2226 | if (task->tk_status >= 0) | ||
2227 | nfs_post_op_update_inode(inode, data->res.fattr); | ||
2221 | /* Call back common NFS writeback processing */ | 2228 | /* Call back common NFS writeback processing */ |
2222 | nfs_commit_done(task); | 2229 | nfs_commit_done(task); |
2223 | } | 2230 | } |
@@ -2233,8 +2240,12 @@ nfs4_proc_commit_setup(struct nfs_write_data *data, int how) | |||
2233 | .rpc_cred = data->cred, | 2240 | .rpc_cred = data->cred, |
2234 | }; | 2241 | }; |
2235 | struct inode *inode = data->inode; | 2242 | struct inode *inode = data->inode; |
2243 | struct nfs_server *server = NFS_SERVER(inode); | ||
2236 | int flags; | 2244 | int flags; |
2237 | 2245 | ||
2246 | data->args.bitmask = server->attr_bitmask; | ||
2247 | data->res.server = server; | ||
2248 | |||
2238 | /* Set the initial flags for the task. */ | 2249 | /* Set the initial flags for the task. */ |
2239 | flags = (how & FLUSH_SYNC) ? 0 : RPC_TASK_ASYNC; | 2250 | flags = (how & FLUSH_SYNC) ? 0 : RPC_TASK_ASYNC; |
2240 | 2251 | ||