ceph: use separate class for ceph sockets' sk_lock
authorSage Weil <sage@newdream.net>
Tue, 13 Apr 2010 21:07:07 +0000 (14:07 -0700)
committerSage Weil <sage@newdream.net>
Tue, 13 Apr 2010 21:07:07 +0000 (14:07 -0700)
Use a separate class for ceph sockets to prevent lockdep confusion.
Because ceph sockets only get passed kernel pointers, there is no
dependency from sk_lock -> mmap_sem.  If we share the same class as other
sockets, lockdep detects a circular dependency from

mmap_sem (page fault) -> fs mutex -> sk_lock -> mmap_sem

because dependencies are noted from both ceph and user contexts.  Using
a separate class prevents the sk_lock(ceph) -> mmap_sem dependency and
makes lockdep happy.

Signed-off-by: Sage Weil <sage@newdream.net>

No differences found