Whamcloud - gitweb
b=24375 Fix a race between completion and enqueue
authorVitaly Fertman <vitaly.fertman@oracle.com>
Tue, 22 Feb 2011 10:29:53 +0000 (13:29 +0300)
committerTerry Rutledge <terry.rutledge@oracle.com>
Tue, 22 Feb 2011 16:19:56 +0000 (08:19 -0800)
commit23c8c969a4a55f6f4fb20c79ed192a3acbad371c
tree819dd1eaa1e90fffec3e6aea5c3018e4c893057d
parentf2694920e9e33698ae837281825503c0e09af46b
b=24375 Fix a race between completion and enqueue

o=green
i=vitaly
i=vs

ldlm_enqueue_tail does not obtain proper lockng when checking lock mode to see
if the lock is granted, so there is a window where ldlm_handle_completion_ast
can update lvb with correct data, but beforeit has a chance to update the lock
mode, the ldlm_enqueue_tail will check the lock mode and since the lock is not
granted yet, it will overwrite correct lvb with stale value from enqueue time.
lustre/ldlm/ldlm_request.c