Subject: Re: nfsd: locking botch in op %d
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Bill Studenmund <wrstuden@zembu.com>
List: tech-kern
Date: 03/22/2001 11:08:46
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-294621423-985288126=:286
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Tue, 13 Mar 2001, der Mouse wrote:

> > Could you try changing the genfs_no{,is,un}lock{,ed} calls into the
> > real-lock varieties and see what happens?
> 
> I didn't try that, since I don't know what else uses those routines,
> and some uses of them may depend on their semantics.  (If you really
> want me to, I can try that, but it wouldn't surprise me if it broke
> something else, something that depends on the genfs_no* behavior being
> what the name implies.)
> 
> What I did do, and it seems to have made the problem go away, is

...

> I can't pretend to believe that this is the right fix.  But it made my
> symptoms go away; if it does likewise for the other person who had the
> problem, I'd be inclined to say it is the locking problem I outlined.
> What the proper fix is, that question I'll leave up to those who
> actually understand the code.

Could you please try the attached fix? It's essentially your fix, with the
unlock moved up a few lines (before we start tearing vp down) and extended
to the other file systems.

1.5.1 is getting close to cut, and we'd like to get this fixed. This is
the fix I propose...

Take care,

Bill

--0-294621423-985288126=:286
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=diffie
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.21.0103221108460.286@candlekeep.home-net.internetconnect.net>
Content-Description: patch to fix unlock
Content-Disposition: attachment; filename=diffie

SW5kZXg6IGlzb2ZzL2NkOTY2MC9jZDk2NjBfdmZzb3BzLmMNCj09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT0NClJDUyBmaWxlOiAvY3Zzcm9vdC9zeXNzcmMvc3lz
L2lzb2ZzL2NkOTY2MC9jZDk2NjBfdmZzb3BzLmMsdg0KcmV0cmlldmluZyBy
ZXZpc2lvbiAxLjUyDQpkaWZmIC11IC1yMS41MiB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