[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DOC-FIX] netfs.h

From: Marcus Brinkmann
Subject: Re: [DOC-FIX] netfs.h
Date: Sat, 20 Jan 2001 18:25:12 +0100
User-agent: Mutt/1.1.4i

On Sun, Jan 14, 2001 at 10:33:51PM -0500, Neal H Walfield wrote:
> -/* Add a reference to node NP, which must be locked by the caller.  */
> +/* Add a reference to node NP (NP does not have to be locked).  */
>  void netfs_nref (struct node *np);
>  /* Releases a node.  Drops a reference to node NP, which must not be

Can you explain this change? If it is to match the code in
check_lookup_cache in nfs/name-cache.c, I think that the code is in error
and should be fixed to lock the node before acquiring the reference.
All other callers lock the node, and I looking at nput or nrele, I find
not having the node locked is rather dangerous. (Note that in nfs/name-cache.c,
there is an indirect guarantee that REFERENCES doesn't drop to zero because
one reference is hold for the cached node, and the cache lock is hold during
the entire operation).

All other changes are ok.


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]