|
@@ -2599,14 +2599,19 @@ static int _nfs4_proc_remove(struct inode *dir, struct qstr *name)
|
|
.rpc_argp = &args,
|
|
.rpc_argp = &args,
|
|
.rpc_resp = &res,
|
|
.rpc_resp = &res,
|
|
};
|
|
};
|
|
- int status;
|
|
|
|
|
|
+ int status = -ENOMEM;
|
|
|
|
+
|
|
|
|
+ res.dir_attr = nfs_alloc_fattr();
|
|
|
|
+ if (res.dir_attr == NULL)
|
|
|
|
+ goto out;
|
|
|
|
|
|
- nfs_fattr_init(&res.dir_attr);
|
|
|
|
status = nfs4_call_sync(server, &msg, &args, &res, 1);
|
|
status = nfs4_call_sync(server, &msg, &args, &res, 1);
|
|
if (status == 0) {
|
|
if (status == 0) {
|
|
update_changeattr(dir, &res.cinfo);
|
|
update_changeattr(dir, &res.cinfo);
|
|
- nfs_post_op_update_inode(dir, &res.dir_attr);
|
|
|
|
|
|
+ nfs_post_op_update_inode(dir, res.dir_attr);
|
|
}
|
|
}
|
|
|
|
+ nfs_free_fattr(res.dir_attr);
|
|
|
|
+out:
|
|
return status;
|
|
return status;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2641,7 +2646,7 @@ static int nfs4_proc_unlink_done(struct rpc_task *task, struct inode *dir)
|
|
if (nfs4_async_handle_error(task, res->server, NULL) == -EAGAIN)
|
|
if (nfs4_async_handle_error(task, res->server, NULL) == -EAGAIN)
|
|
return 0;
|
|
return 0;
|
|
update_changeattr(dir, &res->cinfo);
|
|
update_changeattr(dir, &res->cinfo);
|
|
- nfs_post_op_update_inode(dir, &res->dir_attr);
|
|
|
|
|
|
+ nfs_post_op_update_inode(dir, res->dir_attr);
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
|