mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
NFS: Remove nfs4_setup_sequence from generic unlink code
This is an NFS v4 specific operation, so it belongs in the NFS v4 code and not the generic client. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
ea7c330362
commit
34e137cc7e
5 changed files with 34 additions and 19 deletions
|
@ -20,15 +20,6 @@
|
|||
#include "iostat.h"
|
||||
#include "delegation.h"
|
||||
|
||||
struct nfs_unlinkdata {
|
||||
struct hlist_node list;
|
||||
struct nfs_removeargs args;
|
||||
struct nfs_removeres res;
|
||||
struct inode *dir;
|
||||
struct rpc_cred *cred;
|
||||
struct nfs_fattr dir_attr;
|
||||
};
|
||||
|
||||
/**
|
||||
* nfs_free_unlinkdata - release data from a sillydelete operation.
|
||||
* @data: pointer to unlink structure.
|
||||
|
@ -107,25 +98,16 @@ static void nfs_async_unlink_release(void *calldata)
|
|||
nfs_sb_deactive(sb);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
static void nfs_unlink_prepare(struct rpc_task *task, void *calldata)
|
||||
{
|
||||
struct nfs_unlinkdata *data = calldata;
|
||||
struct nfs_server *server = NFS_SERVER(data->dir);
|
||||
|
||||
if (nfs4_setup_sequence(server, &data->args.seq_args,
|
||||
&data->res.seq_res, task))
|
||||
return;
|
||||
rpc_call_start(task);
|
||||
NFS_PROTO(data->dir)->unlink_rpc_prepare(task, data);
|
||||
}
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
|
||||
static const struct rpc_call_ops nfs_unlink_ops = {
|
||||
.rpc_call_done = nfs_async_unlink_done,
|
||||
.rpc_release = nfs_async_unlink_release,
|
||||
#if defined(CONFIG_NFS_V4_1)
|
||||
.rpc_call_prepare = nfs_unlink_prepare,
|
||||
#endif /* CONFIG_NFS_V4_1 */
|
||||
};
|
||||
|
||||
static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct nfs_unlinkdata *data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue