diff options
Diffstat (limited to 'fs/nfs/nfs3proc.c')
-rw-r--r-- | fs/nfs/nfs3proc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 088dceb513b8..80378d1283cb 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -406,12 +406,17 @@ nfs3_proc_remove(struct inode *dir, struct qstr *name) | |||
406 | .rpc_argp = &arg, | 406 | .rpc_argp = &arg, |
407 | .rpc_resp = &res, | 407 | .rpc_resp = &res, |
408 | }; | 408 | }; |
409 | int status; | 409 | int status = -ENOMEM; |
410 | 410 | ||
411 | dprintk("NFS call remove %s\n", name->name); | 411 | dprintk("NFS call remove %s\n", name->name); |
412 | nfs_fattr_init(&res.dir_attr); | 412 | res.dir_attr = nfs_alloc_fattr(); |
413 | if (res.dir_attr == NULL) | ||
414 | goto out; | ||
415 | |||
413 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); | 416 | status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0); |
414 | nfs_post_op_update_inode(dir, &res.dir_attr); | 417 | nfs_post_op_update_inode(dir, res.dir_attr); |
418 | nfs_free_fattr(res.dir_attr); | ||
419 | out: | ||
415 | dprintk("NFS reply remove: %d\n", status); | 420 | dprintk("NFS reply remove: %d\n", status); |
416 | return status; | 421 | return status; |
417 | } | 422 | } |
@@ -429,7 +434,7 @@ nfs3_proc_unlink_done(struct rpc_task *task, struct inode *dir) | |||
429 | if (nfs3_async_handle_jukebox(task, dir)) | 434 | if (nfs3_async_handle_jukebox(task, dir)) |
430 | return 0; | 435 | return 0; |
431 | res = task->tk_msg.rpc_resp; | 436 | res = task->tk_msg.rpc_resp; |
432 | nfs_post_op_update_inode(dir, &res->dir_attr); | 437 | nfs_post_op_update_inode(dir, res->dir_attr); |
433 | return 1; | 438 | return 1; |
434 | } | 439 | } |
435 | 440 | ||