Alex Elder d8fb02abdc ceph: create a new session lock to avoid lock inversion
Lockdep was reporting a possible circular lock dependency in
dentry_lease_is_valid().  That function needs to sample the
session's s_cap_gen and and s_cap_ttl fields coherently, but needs
to do so while holding a dentry lock.  The s_cap_lock field was
being used to protect the two fields, but that can't be taken while
holding a lock on a dentry within the session.

In most cases, the s_cap_gen and s_cap_ttl fields only get operated
on separately.  But in three cases they need to be updated together.
Implement a new lock to protect the spots updating both fields
atomically is required.

Signed-off-by: Alex Elder <elder@dreamhost.com>
Reviewed-by: Sage Weil <sage@newdream.net>
2012-02-02 12:49:19 -08:00
..
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-08-22 17:41:48 -07:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-07-26 16:49:47 -07:00
2011-11-02 12:53:43 +01:00
2011-07-26 13:05:28 -04:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 16:06:58 -07:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-11-02 16:07:03 -07:00
2011-11-16 09:21:50 +01:00
2011-10-31 17:30:44 -07:00
2011-10-31 17:30:45 -07:00
2011-07-26 16:49:47 -07:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:43 +01:00
2011-05-26 10:01:43 -06:00
2011-10-28 14:59:00 +02:00
2011-10-31 17:30:44 -07:00
2011-07-25 20:57:11 -07:00
2011-11-02 12:53:43 +01:00
2011-11-02 12:53:42 +01:00
2011-07-18 12:29:43 -04:00