[PATCH v4 2/6] block: Add Sed-opal library

Christoph Hellwig hch at infradead.org
Sun Jan 8 05:32:51 PST 2017


On Fri, Dec 30, 2016 at 02:02:56PM -0700, Jon Derrick wrote:
> It's a bit nontraditional to lock and unlock in different functions, but
> I see why you're doing it this way.
> 
> Can we move the mutex locking/unlocking to the callers of these
> functions, such that they are both in the same function; then we can use
> lockdep_assert_held(..) on the in-between?

Yes, that sounds like a good idea to me.  Note that sparse would warn
about these unbalanced locks/unlocks without annotations, so I'll use
this opportunity to run sparse over it.  Documentation for it used to
be trivial to find in Documentation/sparse.txt but somehow has
disappeared in the latest kernel tree unfortunately.



More information about the Linux-nvme mailing list