>You may also want to protect the refcount checks below with the same lock, just >to be consistent.
Good suggestion! I didn't protect it because I found other places using refcnt. But it turns out they are not link devices. I have uploaded patch v2.
>You may also want to protect the refcount checks below with the same lock, just >to be consistent.
Good suggestion! I didn't protect it because I found other places using refcnt. But it turns out they are not link devices. I have uploaded patch v2.