re: NFSv4.1 handle DS stateid errors

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

 



Hello Andy Adamson,

This is a semi-automatic email about new static checker warnings.

The patch 9cb8196839ab: "NFSv4.1 handle DS stateid errors" from Mar 
7, 2012, leads to the following Smatch complaint:

fs/nfs/nfs4filelayout.c:102 filelayout_async_handle_error()
	 warn: variable dereferenced before check 'state' (see line 90)

fs/nfs/nfs4filelayout.c
    89	{
    90		struct nfs_server *mds_server = NFS_SERVER(state->inode);
                                                           ^^^^^^^^^^^^
new dereference.

    91		struct nfs_client *mds_client = mds_server->nfs_client;
    92	
    93		if (task->tk_status >= 0)
    94			return 0;
    95		*reset = 0;
    96	
    97		switch (task->tk_status) {
    98		/* MDS state errors */
    99		case -NFS4ERR_DELEG_REVOKED:
   100		case -NFS4ERR_ADMIN_REVOKED:
   101		case -NFS4ERR_BAD_STATEID:
   102			if (state != NULL)
                            ^^^^^^^^^^^^^

new check.

   103				nfs_remove_bad_delegation(state->inode);
   104		case -NFS4ERR_OPENMODE:

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