From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v2 17/22] IB/srpt: Convert rch_list to RCU Date: Tue, 2 Feb 2016 12:12:57 +0100 Message-ID: <20160202111257.GI28315@lst.de> References: <56ABF16E.7070006@sandisk.com> <56ABF301.8080105@sandisk.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <56ABF301.8080105-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 > - spin_lock_irq(&sdev->spinlock); > + rcu_read_lock(); > res = list_empty(&sdev->rch_list); > - spin_unlock_irq(&sdev->spinlock); > + rcu_read_unlock(); It seems like this is the only RCU criticical session. How about just using list_del_init to delete from rch_list and calling list_empty_careful here to avoid the need for RCU here? -- 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