dm snapshot: suppress debugobjects workqueue warning
PATCH 1/1 dm snapshot: suppress debugobjects workqueue warning
chunk_io() declares its 'struct mdata_req' on the stack and then initializes its 'struct work_struct' member. Annotate the initialization of this workqueue with INIT_WORK_ON_STACK to suppress a debugobjects warning seen when CONFIG_DEBUG_OBJECTS_WORK is enabled:
ODEBUG: object is on stack, but not annotated
------------[ cut here ]------------ WARNING: at lib/debugobjects.c:291 __debug_object_init+0x2b9/0x35c() ... Call Trace: [<ffffffff810485ac>] warn_slowpath_common+0x7c/0x94 [<ffffffff810485d8>] warn_slowpath_null+0x14/0x16 [<ffffffff811e113b>] __debug_object_init+0x2b9/0x35c [<ffffffff811e120b>] debug_object_init+0x14/0x16 [<ffffffff810606c0>] __init_work+0x27/0x29 [<ffffffffa0077306>] chunk_io+0xba/0x127 [dm_snapshot] ...
Signed-off-by Mike Snitzer <[email protected]>
---
drivers/md/dm-snap-persistent.c +1 -1
@@ -254,7 +254,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw,* Issue the synchronous I/O from a different thread * to avoid generic_make_request recursion. */ -INIT_WORK (&req.work, do_metadata); +INIT_WORK_ON_STACK (&req.work, do_metadata);queue_work (ps->metadata_wq, &req.work);flush_workqueue (ps->metadata_wq);