Skip to content

Commit

Permalink
NFS: Rename struct nfs4_offloadcancel_data
Browse files Browse the repository at this point in the history
Refactor: This struct can be used unchanged for the new
OFFLOAD_STATUS implementation, so give it a more generic name.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
  • Loading branch information
Chuck Lever authored and Anna Schumaker committed Jan 21, 2025
1 parent 36f4e9e commit aa9e4ad
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions fs/nfs/nfs42proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,15 +498,15 @@ ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src,
return err;
}

struct nfs42_offloadcancel_data {
struct nfs42_offload_data {
struct nfs_server *seq_server;
struct nfs42_offload_status_args args;
struct nfs42_offload_status_res res;
};

static void nfs42_offload_cancel_prepare(struct rpc_task *task, void *calldata)
static void nfs42_offload_prepare(struct rpc_task *task, void *calldata)
{
struct nfs42_offloadcancel_data *data = calldata;
struct nfs42_offload_data *data = calldata;

nfs4_setup_sequence(data->seq_server->nfs_client,
&data->args.osa_seq_args,
Expand All @@ -515,7 +515,7 @@ static void nfs42_offload_cancel_prepare(struct rpc_task *task, void *calldata)

static void nfs42_offload_cancel_done(struct rpc_task *task, void *calldata)
{
struct nfs42_offloadcancel_data *data = calldata;
struct nfs42_offload_data *data = calldata;

trace_nfs4_offload_cancel(&data->args, task->tk_status);
nfs41_sequence_done(task, &data->res.osr_seq_res);
Expand All @@ -525,22 +525,22 @@ static void nfs42_offload_cancel_done(struct rpc_task *task, void *calldata)
rpc_restart_call_prepare(task);
}

static void nfs42_free_offloadcancel_data(void *data)
static void nfs42_offload_release(void *data)
{
kfree(data);
}

static const struct rpc_call_ops nfs42_offload_cancel_ops = {
.rpc_call_prepare = nfs42_offload_cancel_prepare,
.rpc_call_prepare = nfs42_offload_prepare,
.rpc_call_done = nfs42_offload_cancel_done,
.rpc_release = nfs42_free_offloadcancel_data,
.rpc_release = nfs42_offload_release,
};

static int nfs42_do_offload_cancel_async(struct file *dst,
nfs4_stateid *stateid)
{
struct nfs_server *dst_server = NFS_SERVER(file_inode(dst));
struct nfs42_offloadcancel_data *data = NULL;
struct nfs42_offload_data *data = NULL;
struct nfs_open_context *ctx = nfs_file_open_context(dst);
struct rpc_task *task;
struct rpc_message msg = {
Expand All @@ -559,7 +559,7 @@ static int nfs42_do_offload_cancel_async(struct file *dst,
if (!(dst_server->caps & NFS_CAP_OFFLOAD_CANCEL))
return -EOPNOTSUPP;

data = kzalloc(sizeof(struct nfs42_offloadcancel_data), GFP_KERNEL);
data = kzalloc(sizeof(struct nfs42_offload_data), GFP_KERNEL);
if (data == NULL)
return -ENOMEM;

Expand Down

0 comments on commit aa9e4ad

Please sign in to comment.