Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365541
b: refs/heads/master
c: 4862125
h: refs/heads/master
i:
  365539: 0940a7b
v: v3
  • Loading branch information
Tejun Heo committed Apr 1, 2013
1 parent 3d53170 commit e3b92c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13e2e556013a543eebd238d1c2759195e3c0c9fc
refs/heads/master: 4862125b0256a946d2749a1d5003b0604bc3cb4d
11 changes: 8 additions & 3 deletions trunk/kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -3636,6 +3636,7 @@ int apply_workqueue_attrs(struct workqueue_struct *wq,
struct workqueue_attrs *new_attrs;
struct pool_workqueue *pwq = NULL, *last_pwq;
struct worker_pool *pool;
int ret;

/* only unbound workqueues can change attributes */
if (WARN_ON(!(wq->flags & WQ_UNBOUND)))
Expand Down Expand Up @@ -3668,12 +3669,16 @@ int apply_workqueue_attrs(struct workqueue_struct *wq,
spin_unlock_irq(&last_pwq->pool->lock);
}

return 0;
ret = 0;
/* fall through */
out_free:
free_workqueue_attrs(new_attrs);
return ret;

enomem:
kmem_cache_free(pwq_cache, pwq);
free_workqueue_attrs(new_attrs);
return -ENOMEM;
ret = -ENOMEM;
goto out_free;
}

static int alloc_and_link_pwqs(struct workqueue_struct *wq)
Expand Down

0 comments on commit e3b92c6

Please sign in to comment.