[linux-cifs-client] Re: [PATCH] cifs: when renaming don't try to
unlink negative dentry
Jeff Layton
jlayton at redhat.com
Fri Apr 17 23:02:03 GMT 2009
On Fri, 17 Apr 2009 16:16:23 -0500
Steve French <smfrench at gmail.com> wrote:
> I merged this, adding the CC: stable, but think we need to also
> consistently check for inode == NULL in cifs_unlink (we only check in
> two branches now)
>
> Any objections if I also add the following check:
>
I think it would be preferable to just check once for inode==NULL in
cifs_unlink near the top and BUG() if it is. Note that vfs_unlink takes
the i_mutex on this before calling the .unlink inode op, so we're
guaranteed that the d_inode won't be NULL from that codepath.
I think if we get an unlink on a negative dentry then we should
probably consider that a BUG().
Other .unlink ops also seem to assume that you can't call .unlink with
a negative dentry.
--
Jeff Layton <jlayton at redhat.com>
More information about the linux-cifs-client
mailing list