Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-1914 ldlm: add doxygen comments
[fs/lustre-release.git]
/
lustre
/
ldlm
/
l_lock.c
diff --git
a/lustre/ldlm/l_lock.c
b/lustre/ldlm/l_lock.c
index
a0013e1
..
8831b39
100644
(file)
--- a/
lustre/ldlm/l_lock.c
+++ b/
lustre/ldlm/l_lock.c
@@
-42,13
+42,15
@@
#include <lustre_dlm.h>
#include <lustre_lib.h>
#include <lustre_dlm.h>
#include <lustre_lib.h>
-/*
- * ldlm locking uses resource to serialize access to locks
+/**
+ * Lock a lock and its resource.
+ *
+ * LDLM locking uses resource to serialize access to locks
* but there is a case when we change resource of lock upon
* but there is a case when we change resource of lock upon
- * enqueue reply.
we rely on that
lock->l_resource = new_res
- *
is atomic
+ * enqueue reply.
We rely on
lock->l_resource = new_res
+ *
being an atomic operation.
*/
*/
-struct ldlm_resource *
lock_res_and_lock(struct ldlm_lock *lock)
+struct ldlm_resource *lock_res_and_lock(struct ldlm_lock *lock)
{
/* on server-side resource of lock doesn't change */
if (!lock->l_ns_srv)
{
/* on server-side resource of lock doesn't change */
if (!lock->l_ns_srv)
@@
-61,6
+63,9
@@
struct ldlm_resource * lock_res_and_lock(struct ldlm_lock *lock)
}
EXPORT_SYMBOL(lock_res_and_lock);
}
EXPORT_SYMBOL(lock_res_and_lock);
+/**
+ * Unlock a lock and its resource previously locked with lock_res_and_lock
+ */
void unlock_res_and_lock(struct ldlm_lock *lock)
{
/* on server-side resource of lock doesn't change */
void unlock_res_and_lock(struct ldlm_lock *lock)
{
/* on server-side resource of lock doesn't change */