[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20060831232029.b003e8a7.akpm@osdl.org>
Date: Thu, 31 Aug 2006 23:20:29 -0700
From: Andrew Morton <akpm@...l.org>
To: NeilBrown <neilb@...e.de>
Cc: nfs@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
Olaf Kirch <okir@...e.de>
Subject: Re: [PATCH 004 of 19] knfsd: lockd: introduce nsm_handle
On Fri, 1 Sep 2006 14:38:25 +1000
NeilBrown <neilb@...e.de> wrote:
> +nsm_release(struct nsm_handle *nsm)
> +{
> + if (!nsm)
> + return;
> + if (atomic_read(&nsm->sm_count) == 1) {
> + down(&nsm_sema);
> + if (atomic_dec_and_test(&nsm->sm_count)) {
> + list_del(&nsm->sm_link);
> + kfree(nsm);
> + }
> + up(&nsm_sema);
> + }
> +}
That's weird-looking. Are you sure? afaict, if ->sm_count ever gets a
value of 2 or more, it's unfreeable.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists