Re: [PATCH V2 for-next 3/7] IB/core: Add idr based standard types

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

 



On Sun, Mar 19, 2017 at 05:59:01PM +0200, Matan Barak wrote:

> +int ib_uverbs_dealloc_xrcd(struct ib_uverbs_device *dev,
> +			   struct ib_xrcd *xrcd,
> +			   enum rdma_remove_reason why)
>  {
>  	struct inode *inode;
> +	int ret;
>  
>  	inode = xrcd->inode;
>  	if (inode && !atomic_dec_and_test(&xrcd->usecnt))
> -		return;
> +		return 0;
>  
> -	ib_dealloc_xrcd(xrcd);
> +	ret = ib_dealloc_xrcd(xrcd);
>  
> -	if (inode)
> +	if (why == RDMA_REMOVE_DESTROY && ret)
> +		atomic_inc(&xrcd->usecnt);

Is this suposed to be _inc? Might need a comment since every other
dealloc has a dec?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux