aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2013-02-15 12:42:30 -0500
committerAlex Elder <elder@inktank.com>2013-02-18 13:20:05 -0500
commit2d2f522699fe8b827087941eb31b9a12cf465f17 (patch)
tree4661d5115a3bcabd5e4e1cfb38bad58fa8152597 /net
parent3c663bbdcdf9296e0fe3362acb9e81f49d7b72c6 (diff)
libceph: kill ceph_osdc_wait_event()
There are no actual users of ceph_osdc_wait_event(). This would have been one-shot events, but we no longer support those so just get rid of this function. Since this leaves nothing else that waits for the completion of an event, we can get rid of the completion in a struct ceph_osd_event. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/osd_client.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 4322faa7c811..ad6b8b35f5ca 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1494,7 +1494,6 @@ int ceph_osdc_create_event(struct ceph_osd_client *osdc,
1494 RB_CLEAR_NODE(&event->node); 1494 RB_CLEAR_NODE(&event->node);
1495 kref_init(&event->kref); /* one ref for us */ 1495 kref_init(&event->kref); /* one ref for us */
1496 kref_get(&event->kref); /* one ref for the caller */ 1496 kref_get(&event->kref); /* one ref for the caller */
1497 init_completion(&event->completion);
1498 1497
1499 spin_lock(&osdc->event_lock); 1498 spin_lock(&osdc->event_lock);
1500 event->cookie = ++osdc->event_count; 1499 event->cookie = ++osdc->event_count;
@@ -1530,7 +1529,6 @@ static void do_event_work(struct work_struct *work)
1530 1529
1531 dout("do_event_work completing %p\n", event); 1530 dout("do_event_work completing %p\n", event);
1532 event->cb(ver, notify_id, opcode, event->data); 1531 event->cb(ver, notify_id, opcode, event->data);
1533 complete(&event->completion);
1534 dout("do_event_work completed %p\n", event); 1532 dout("do_event_work completed %p\n", event);
1535 ceph_osdc_put_event(event); 1533 ceph_osdc_put_event(event);
1536 kfree(event_work); 1534 kfree(event_work);
@@ -1588,7 +1586,6 @@ static void handle_watch_notify(struct ceph_osd_client *osdc,
1588 return; 1586 return;
1589 1587
1590done_err: 1588done_err:
1591 complete(&event->completion);
1592 ceph_osdc_put_event(event); 1589 ceph_osdc_put_event(event);
1593 return; 1590 return;
1594 1591
@@ -1597,21 +1594,6 @@ bad:
1597 return; 1594 return;
1598} 1595}
1599 1596
1600int ceph_osdc_wait_event(struct ceph_osd_event *event, unsigned long timeout)
1601{
1602 int err;
1603
1604 dout("wait_event %p\n", event);
1605 err = wait_for_completion_interruptible_timeout(&event->completion,
1606 timeout * HZ);
1607 ceph_osdc_put_event(event);
1608 if (err > 0)
1609 err = 0;
1610 dout("wait_event %p returns %d\n", event, err);
1611 return err;
1612}
1613EXPORT_SYMBOL(ceph_osdc_wait_event);
1614
1615/* 1597/*
1616 * Register request, send initial attempt. 1598 * Register request, send initial attempt.
1617 */ 1599 */