X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fldlm%2Fl_lock.c;h=e23a75530c5344ddd40fee3ff040a48efd79d067;hb=ec295cad998d4d5e7fc915491da5ac646dbc6af6;hp=63f2ad53289d85ca542ebd18cd8a50b883bf5d03;hpb=113303973ec9f8484eb2355a1a6ef3c4c7fd6a56;p=fs%2Flustre-release.git diff --git a/lustre/ldlm/l_lock.c b/lustre/ldlm/l_lock.c index 63f2ad532..e23a755 100644 --- a/lustre/ldlm/l_lock.c +++ b/lustre/ldlm/l_lock.c @@ -43,13 +43,13 @@ struct ldlm_resource * lock_res_and_lock(struct ldlm_lock *lock) { struct ldlm_resource *res = lock->l_resource; - if (!res->lr_namespace->ns_client) { + if (ns_is_server(res->lr_namespace)) { /* on server-side resource of lock doesn't change */ lock_res(res); return res; } - lock_bitlock(lock); + spin_lock(&lock->l_lock); res = lock->l_resource; lock_res(res); return res; @@ -59,13 +59,13 @@ void unlock_res_and_lock(struct ldlm_lock *lock) { struct ldlm_resource *res = lock->l_resource; - if (!res->lr_namespace->ns_client) { + if (ns_is_server(res->lr_namespace)) { /* on server-side resource of lock doesn't change */ unlock_res(res); return; } unlock_res(res); - unlock_bitlock(lock); + spin_unlock(&lock->l_lock); }