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-1346 libcfs: cleanup waitq related primitives
[fs/lustre-release.git]
/
libcfs
/
libcfs
/
user-lock.c
diff --git
a/libcfs/libcfs/user-lock.c
b/libcfs/libcfs/user-lock.c
index
214ca3a
..
fcba2cd
100644
(file)
--- a/
libcfs/libcfs/user-lock.c
+++ b/
libcfs/libcfs/user-lock.c
@@
-172,7
+172,7
@@
void init_completion(struct completion *c)
{
LASSERT(c != NULL);
c->done = 0;
-
cfs_waitq_init
(&c->wait);
+
init_waitqueue_head
(&c->wait);
}
void fini_completion(struct completion *c)
@@
-183,7
+183,7
@@
void complete(struct completion *c)
{
LASSERT(c != NULL);
c->done = 1;
-
cfs_waitq_signal
(&c->wait);
+
wake_up
(&c->wait);
}
void wait_for_completion(struct completion *c)
@@
-242,6
+242,12
@@
void down_write(struct rw_semaphore *s)
(void)s;
}
+void downgrade_write(struct rw_semaphore *s)
+{
+ LASSERT(s != NULL);
+ (void)s;
+}
+
int down_write_trylock(struct rw_semaphore *s)
{
LASSERT(s != NULL);