Whamcloud - gitweb
LU-2600 osd-zfs: batched object accounting
[fs/lustre-release.git] / libcfs / libcfs / user-lock.c
index 214ca3a..fcba2cd 100644 (file)
@@ -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);