Re: [PATCH] nfs_unlink() again, and trivial nfs_fhget

Frank Cusack (fcusack@fcusack.com)
Sat, 21 Jun 2003 18:46:23 -0700


On Wed, Jun 18, 2003 at 04:40:47PM -0700, Trond Myklebust wrote:
> >>>>> " " == Frank Cusack <fcusack@fcusack.com> writes:
>
> >> There is already code to handle this case in the NFS filesystem
> >> code itself.
>
> > No, there isn't.
>
> Yes there is. Look again at nfs_unlink(), following the path

My orig. message wasn't clear because I've gone through this so many
times that I didn't bother to write a complete essay this time.
In fact, it's less than "wasn't clear"; it was UNCLEAR.

My patch does appear to simply prevent unlink, and yes, that case is
ALREADY taken care of. Sorry for the confusion there. My patch isn't
for that purpose.

It's to prevent RENAME of silly-renamed files. Doing so in VFS is a
one-liner, and I agree that the VFS should be as clean as possible,
but let's face it, the VFS *must* have specific fs knowledge. eg,
the ALWAYS_REVAL (something like that) patch you recently submitted
is just to treat NFS differently than other fs's. Just because the
flag doesn't have "NFS" in it doesn't make it generic. (And so I
repeat my earlier suggestion that might make the change more palatable:
rename the NFSFS_RENAMED flag to DONT_UNLINK.)

Please review the thread which ended with the message I previously cited.
One of the things there is a test case showing the problem.

I could write another essay on why the one-liner I proposed is a decent
patch, but I'd rather not. :-) If the patch is accepted, there is a
some simplification that could be done in the NFS code; I will submit a
subsequent patch for that if this first one is accepted.

/fc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/