diff options
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 0ffd4cfd3b1f..d0cb6e163320 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2599,14 +2599,19 @@ static int _nfs4_proc_remove(struct inode *dir, struct qstr *name) | |||
2599 | .rpc_argp = &args, | 2599 | .rpc_argp = &args, |
2600 | .rpc_resp = &res, | 2600 | .rpc_resp = &res, |
2601 | }; | 2601 | }; |
2602 | int status; | 2602 | int status = -ENOMEM; |
2603 | |||
2604 | res.dir_attr = nfs_alloc_fattr(); | ||
2605 | if (res.dir_attr == NULL) | ||
2606 | goto out; | ||
2603 | 2607 | ||
2604 | nfs_fattr_init(&res.dir_attr); | ||
2605 | status = nfs4_call_sync(server, &msg, &args, &res, 1); | 2608 | status = nfs4_call_sync(server, &msg, &args, &res, 1); |
2606 | if (status == 0) { | 2609 | if (status == 0) { |
2607 | update_changeattr(dir, &res.cinfo); | 2610 | update_changeattr(dir, &res.cinfo); |
2608 | nfs_post_op_update_inode(dir, &res.dir_attr); | 2611 | nfs_post_op_update_inode(dir, res.dir_attr); |
2609 | } | 2612 | } |
2613 | nfs_free_fattr(res.dir_attr); | ||
2614 | out: | ||
2610 | return status; | 2615 | return status; |
2611 | } | 2616 | } |
2612 | 2617 | ||
@@ -2641,7 +2646,7 @@ static int nfs4_proc_unlink_done(struct rpc_task *task, struct inode *dir) | |||
2641 | if (nfs4_async_handle_error(task, res->server, NULL) == -EAGAIN) | 2646 | if (nfs4_async_handle_error(task, res->server, NULL) == -EAGAIN) |
2642 | return 0; | 2647 | return 0; |
2643 | update_changeattr(dir, &res->cinfo); | 2648 | update_changeattr(dir, &res->cinfo); |
2644 | nfs_post_op_update_inode(dir, &res->dir_attr); | 2649 | nfs_post_op_update_inode(dir, res->dir_attr); |
2645 | return 1; | 2650 | return 1; |
2646 | } | 2651 | } |
2647 | 2652 | ||