Re: [PATCH 11/40] nfsd: ensure atomicity in nfsd4_free_stateid and nfsd4_validate_stateid

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

 



>  	case NFS4_OPEN_STID:
>  	case NFS4_LOCK_STID:
>  		ret = check_stateid_generation(stateid, &s->sc_stateid, 1);
>  		if (ret)
> -			goto out;
> -		if (s->sc_type == NFS4_LOCK_STID)
> -			ret = nfsd4_free_lock_stateid(openlockstateid(s));
> -		else
> +			break;
> +		if (s->sc_type != NFS4_LOCK_STID) {
>  			ret = nfserr_locks_held;
> -		break;
> +			break;
> +		}
> +		spin_unlock(&cl->cl_lock);
> +		ret = nfsd4_free_lock_stateid(openlockstateid(s));
> +		goto out;

Might be worth to split the open and lock stateid cases here.

Otherwise looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

--
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