[bug report] NFSv4: Convert nfs41_free_stateid to use an asynchronous RPC call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux