From: Christoph Hellwig Subject: Re: [PATCH v3 16/21] IB/srpt: Use a mutex to protect the channel list Date: Tue, 9 Feb 2016 14:16:21 +0100 Message-ID: <20160209131621.GB25849@lst.de> References: <56B3D453.7030409@sandisk.com> <56B3D75B.3030202@sandisk.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <56B3D75B.3030202-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Bart Van Assche Cc: Doug Ledford , Christoph Hellwig , Sagi Grimberg , Alex Estrin , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-rdma@vger.kernel.org On Thu, Feb 04, 2016 at 02:57:31PM -0800, Bart Van Assche wrote: > In a later patch a function that can block will be called while > iterating over the rch_list. Hence protect that list with a > mutex instead of a spinlock. And since it is not allowed to sleep > while the task state != TASK_RUNNING, convert the list test in > srpt_ch_list_empty() into a lockless test. Looks good, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html