OSDN Git Service

xfs: Calling destroy_work_on_stack() to pair with INIT_WORK_ONSTACK()
authorChuansheng Liu <chuansheng.liu@intel.com>
Tue, 7 Jan 2014 08:53:34 +0000 (16:53 +0800)
committerBen Myers <bpm@sgi.com>
Thu, 9 Jan 2014 21:50:31 +0000 (15:50 -0600)
In case CONFIG_DEBUG_OBJECTS_WORK is defined, it is needed to
call destroy_work_on_stack() which frees the debug object to pair
with INIT_WORK_ONSTACK().

Signed-off-by: Liu, Chuansheng <chuansheng.liu@intel.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_bmap_util.c

index 5887e41..3f534e0 100644 (file)
@@ -287,6 +287,7 @@ xfs_bmapi_allocate(
        INIT_WORK_ONSTACK(&args->work, xfs_bmapi_allocate_worker);
        queue_work(xfs_alloc_wq, &args->work);
        wait_for_completion(&done);
+       destroy_work_on_stack(&args->work);
        return args->result;
 }