diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 17:33:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 17:33:41 -0400 |
commit | 3e1f900bff40460d7bbab0ccd1a9efc3c70aee49 (patch) | |
tree | d0e2138ff61bdc9d1bd5b7ae5a1e75267d709afc /fs/nfs/proc.c | |
parent | 12795067cfa595434be0236b102a8eb20d578741 (diff) | |
parent | 0a87cf128f3d3bc6aa7b1040e73109c974ed875a (diff) |
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6:
NFSv4: handle lack of clientaddr in option string
NFSv4: debug print ntohl(status) in nfs client callback xdr code
SUNRPC: Clean up the sillyrename code
NFS: Introduce struct nfs_removeargs+nfs_removeres
NFS: Use dentry->d_time to store the parent directory verifier.
SUNRPC: move bkl locking and xdr proc invocation into a common helper
NFSv4: Fix the nfsv4 readlink reply buffer alignment
NFSv4: Fix the readdir reply buffer alignment
NFSv4: More NFSv4 xdr cleanups
NFSv4: Try to recover from getfh failures in nfs4_xdr_dec_open
NFSv4: 'constify' lookup arguments.
NFSv4: Don't fail nfs4_xdr_dec_open if decode_restorefh() failed
NFSv4: Fix open state recovery
NFSD/SUNRPC: Fix the automatic selection of RPCSEC_GSS
Diffstat (limited to 'fs/nfs/proc.c')
-rw-r--r-- | fs/nfs/proc.c | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index 7be0ee2782cb..845cdde1d8b7 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -272,14 +272,14 @@ nfs_proc_mknod(struct inode *dir, struct dentry *dentry, struct iattr *sattr, | |||
272 | static int | 272 | static int |
273 | nfs_proc_remove(struct inode *dir, struct qstr *name) | 273 | nfs_proc_remove(struct inode *dir, struct qstr *name) |
274 | { | 274 | { |
275 | struct nfs_diropargs arg = { | 275 | struct nfs_removeargs arg = { |
276 | .fh = NFS_FH(dir), | 276 | .fh = NFS_FH(dir), |
277 | .name = name->name, | 277 | .name.len = name->len, |
278 | .len = name->len | 278 | .name.name = name->name, |
279 | }; | 279 | }; |
280 | struct rpc_message msg = { | 280 | struct rpc_message msg = { |
281 | .rpc_proc = &nfs_procedures[NFSPROC_REMOVE], | 281 | .rpc_proc = &nfs_procedures[NFSPROC_REMOVE], |
282 | .rpc_argp = &arg, | 282 | .rpc_argp = &arg, |
283 | }; | 283 | }; |
284 | int status; | 284 | int status; |
285 | 285 | ||
@@ -291,32 +291,16 @@ nfs_proc_remove(struct inode *dir, struct qstr *name) | |||
291 | return status; | 291 | return status; |
292 | } | 292 | } |
293 | 293 | ||
294 | static int | 294 | static void |
295 | nfs_proc_unlink_setup(struct rpc_message *msg, struct dentry *dir, struct qstr *name) | 295 | nfs_proc_unlink_setup(struct rpc_message *msg, struct inode *dir) |
296 | { | 296 | { |
297 | struct nfs_diropargs *arg; | ||
298 | |||
299 | arg = kmalloc(sizeof(*arg), GFP_KERNEL); | ||
300 | if (!arg) | ||
301 | return -ENOMEM; | ||
302 | arg->fh = NFS_FH(dir->d_inode); | ||
303 | arg->name = name->name; | ||
304 | arg->len = name->len; | ||
305 | msg->rpc_proc = &nfs_procedures[NFSPROC_REMOVE]; | 297 | msg->rpc_proc = &nfs_procedures[NFSPROC_REMOVE]; |
306 | msg->rpc_argp = arg; | ||
307 | return 0; | ||
308 | } | 298 | } |
309 | 299 | ||
310 | static int | 300 | static int nfs_proc_unlink_done(struct rpc_task *task, struct inode *dir) |
311 | nfs_proc_unlink_done(struct dentry *dir, struct rpc_task *task) | ||
312 | { | 301 | { |
313 | struct rpc_message *msg = &task->tk_msg; | 302 | nfs_mark_for_revalidate(dir); |
314 | 303 | return 1; | |
315 | if (msg->rpc_argp) { | ||
316 | nfs_mark_for_revalidate(dir->d_inode); | ||
317 | kfree(msg->rpc_argp); | ||
318 | } | ||
319 | return 0; | ||
320 | } | 304 | } |
321 | 305 | ||
322 | static int | 306 | static int |