From: Sage Weil Date: Tue, 16 Mar 2010 20:39:28 +0000 (-0700) Subject: ceph: fix session locking in handle_caps, ceph_check_caps X-Git-Tag: v2.6.34-rc3~6^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdc2ce056a3620139056b60ad7f6d355ad13f445;p=pandora-kernel.git ceph: fix session locking in handle_caps, ceph_check_caps Passing a session pointer to ceph_check_caps() used to mean it would leave the session mutex locked. That wasn't always possible if it wasn't passed CHECK_CAPS_AUTHONLY. If could unlock the passed session and lock a differet session mutex, which was clearly wrong, and also emitted a warning when it a racing CPU retook it and we did an unlock from the wrong context. This was only a problem when there was more than one MDS. First, make ceph_check_caps unconditionally drop the session mutex, so that it is free to lock other sessions as needed. Then adjust the one caller that passes in a session (handle_cap_grant) accordingly. Signed-off-by: Sage Weil --- Reading git-diff-tree failed