Re: [PATCH v4 09/10] nfsd: clean up nfs4_set_delegation

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

 



> +nfs4_set_delegation(struct nfs4_client *clp, struct svc_fh *fh,
> +		    struct nfs4_file *fp)
>  {
> -	int status = 0;
> +	int status;
> +	struct nfs4_delegation *dp;
>  
>  	if (fp->fi_had_conflict)
> -		return -EAGAIN;
> +		return ERR_PTR(-EAGAIN);
> +
> +	dp = alloc_init_deleg(clp, fh);
> +	if (!dp)
> +		return ERR_PTR(-ENOMEM);
> +
>  	get_nfs4_file(fp);

Seems like we should pass the file pointer to alloc_init_deleg as well
so it can set that one one up and grab the reference without any lock?

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