From 863981e96738983919de841ec669e157e6bdaeb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Sun, 11 Sep 2016 04:34:46 -0300 Subject: Linux-libre 4.7.1-gnu --- fs/aufs/wkq.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'fs/aufs/wkq.c') diff --git a/fs/aufs/wkq.c b/fs/aufs/wkq.c index 65c0137a5..216d08f7c 100644 --- a/fs/aufs/wkq.c +++ b/fs/aufs/wkq.c @@ -41,7 +41,7 @@ static void wkq_func(struct work_struct *wk) else { kobject_put(wkinfo->kobj); module_put(THIS_MODULE); /* todo: ?? */ - kfree(wkinfo); + au_delayed_kfree(wkinfo); } } @@ -64,7 +64,7 @@ static int au_wkq_comp_alloc(struct au_wkinfo *wkinfo, struct completion **comp) static void au_wkq_comp_free(struct completion *comp) { - kfree(comp); + au_delayed_kfree(comp); } #else @@ -145,7 +145,7 @@ int au_wkq_nowait(au_wkq_func_t func, void *args, struct super_block *sb, int err; struct au_wkinfo *wkinfo; - percpu_counter_inc(&au_sbi(sb)->si_nowait.nw_len); + atomic_inc(&au_sbi(sb)->si_nowait.nw_len); /* * wkq_func() must free this wkinfo. @@ -175,16 +175,11 @@ int au_wkq_nowait(au_wkq_func_t func, void *args, struct super_block *sb, void au_nwt_init(struct au_nowait_tasks *nwt) { - percpu_counter_init(&nwt->nw_len, 0, GFP_NOFS); + atomic_set(&nwt->nw_len, 0); + /* smp_mb(); */ /* atomic_set */ init_waitqueue_head(&nwt->nw_wq); } -void au_nwt_fin(struct au_nowait_tasks *nwt) -{ - AuDebugOn(percpu_counter_sum(&nwt->nw_len)); - percpu_counter_destroy(&nwt->nw_len); -} - void au_wkq_fin(void) { destroy_workqueue(au_wkq); -- cgit v1.2.3