aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-09-11 04:18:53 -0400
committerIlya Dryomov <idryomov@redhat.com>2014-10-14 13:03:25 -0400
commit91883cd27c4e2523dd53e2bd6f71a1c5e0be5a38 (patch)
tree2c3a8935d1967fa5d7c91ab4ba82d90e8b49f316 /net/ceph
parent03974e8177b36d672eb59658f976f03cb77c1129 (diff)
libceph: don't try checking queue_work() return value
queue_work() doesn't "fail to queue", it returns false if work was already on a queue, which can't happen here since we allocate event_work right before we queue it. So don't bother at all. Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/osd_client.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 01aeddf28469..a528ea34253a 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -2358,24 +2358,19 @@ static void handle_watch_notify(struct ceph_osd_client *osdc,
2358 if (event) { 2358 if (event) {
2359 event_work = kmalloc(sizeof(*event_work), GFP_NOIO); 2359 event_work = kmalloc(sizeof(*event_work), GFP_NOIO);
2360 if (!event_work) { 2360 if (!event_work) {
2361 dout("ERROR: could not allocate event_work\n"); 2361 pr_err("couldn't allocate event_work\n");
2362 goto done_err; 2362 ceph_osdc_put_event(event);
2363 return;
2363 } 2364 }
2364 INIT_WORK(&event_work->work, do_event_work); 2365 INIT_WORK(&event_work->work, do_event_work);
2365 event_work->event = event; 2366 event_work->event = event;
2366 event_work->ver = ver; 2367 event_work->ver = ver;
2367 event_work->notify_id = notify_id; 2368 event_work->notify_id = notify_id;
2368 event_work->opcode = opcode; 2369 event_work->opcode = opcode;
2369 if (!queue_work(osdc->notify_wq, &event_work->work)) {
2370 dout("WARNING: failed to queue notify event work\n");
2371 goto done_err;
2372 }
2373 }
2374 2370
2375 return; 2371 queue_work(osdc->notify_wq, &event_work->work);
2372 }
2376 2373
2377done_err:
2378 ceph_osdc_put_event(event);
2379 return; 2374 return;
2380 2375
2381bad: 2376bad: