Re: [PATCH v7 for-next 2/2] RDMA/hns: Delayed flush cqe process with workqueue

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

 



On Wed, Jan 15, 2020 at 05:49:13PM +0800, Yixian Liu wrote:
> -			if (ret) {
> -				spin_unlock_irqrestore(&qp->sq.lock, flags);
> -				*bad_wr = wr;
> -				return ret;
> +			if (atomic_read(&qp->flush_cnt) == 0) {
> +				atomic_set(&qp->flush_cnt, 1);
> +				init_flush_work(hr_dev, qp);
> +			} else {
> +				atomic_inc(&qp->flush_cnt);
>  			}

Surely this should be written using atomic_add_return ??

Jason



[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