From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [patch] GFS2: alloc_workqueue() doesn't return an ERR_PTR
Date: Thu, 15 Aug 2013 10:49:52 +0100 [thread overview]
Message-ID: <1376560192.2719.13.camel@menhir> (raw)
In-Reply-To: <20130815075443.GA19280@elgon.mountain>
Hi,
On Thu, 2013-08-15 at 10:54 +0300, Dan Carpenter wrote:
> alloc_workqueue() returns a NULL on error, it doesn't return an ERR_PTR.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Thanks, I've added this to the gfs2 git tree,
Steve.
> diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
> index a9d8caf..5433777 100644
> --- a/fs/gfs2/glock.c
> +++ b/fs/gfs2/glock.c
> @@ -1844,14 +1844,14 @@ int __init gfs2_glock_init(void)
>
> glock_workqueue = alloc_workqueue("glock_workqueue", WQ_MEM_RECLAIM |
> WQ_HIGHPRI | WQ_FREEZABLE, 0);
> - if (IS_ERR(glock_workqueue))
> - return PTR_ERR(glock_workqueue);
> + if (!glock_workqueue)
> + return -ENOMEM;
> gfs2_delete_workqueue = alloc_workqueue("delete_workqueue",
> WQ_MEM_RECLAIM | WQ_FREEZABLE,
> 0);
> - if (IS_ERR(gfs2_delete_workqueue)) {
> + if (!gfs2_delete_workqueue) {
> destroy_workqueue(glock_workqueue);
> - return PTR_ERR(gfs2_delete_workqueue);
> + return -ENOMEM;
> }
>
> register_shrinker(&glock_shrinker);
prev parent reply other threads:[~2013-08-15 9:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 7:54 [Cluster-devel] [patch] GFS2: alloc_workqueue() doesn't return an ERR_PTR Dan Carpenter
2013-08-15 9:49 ` Steven Whitehouse [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376560192.2719.13.camel@menhir \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).