* [bug report] NFSv4: Convert nfs41_free_stateid to use an asynchronous RPC call
@ 2018-06-04 12:23 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-06-04 12:23 UTC (permalink / raw)
To: Trond.Myklebust; +Cc: linux-nfs
Hello Trond Myklebust,
The patch 7c1d5fae4a87: "NFSv4: Convert nfs41_free_stateid to use an
asynchronous RPC call" from May 3, 2013, leads to the following
static checker warning:
fs/nfs/nfs4proc.c:9395 nfs41_free_stateid()
warn: 'task' isn't an ERR_PTR
fs/nfs/nfs4proc.c
9376 struct nfs_free_stateid_data *data;
9377 struct rpc_task *task;
9378
9379 nfs4_state_protect(server->nfs_client, NFS_SP4_MACH_CRED_STATEID,
9380 &task_setup.rpc_client, &msg);
9381
9382 dprintk("NFS call free_stateid %p\n", stateid);
9383 data = kmalloc(sizeof(*data), GFP_NOFS);
9384 if (!data)
9385 return -ENOMEM;
9386 data->server = server;
9387 nfs4_stateid_copy(&data->args.stateid, stateid);
9388
9389 task_setup.callback_data = data;
9390
9391 msg.rpc_argp = &data->args;
9392 msg.rpc_resp = &data->res;
9393 nfs4_init_sequence(&data->args.seq_args, &data->res.seq_res, 1, privileged);
9394 task = rpc_run_task(&task_setup);
9395 if (IS_ERR(task))
^^^^
Apparently rpc_run_task() can't ever fail so this warning stating true
facts...
9396 return PTR_ERR(task);
9397 rpc_put_task(task);
9398 return 0;
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-06-04 12:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-04 12:23 [bug report] NFSv4: Convert nfs41_free_stateid to use an asynchronous RPC call Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).