[linux-cifs-client] Re: [PATCH] cifs: when renaming don't try to unlink negative dentry

Steve French smfrench at gmail.com
Sat Apr 18 02:31:50 GMT 2009


On Fri, Apr 17, 2009 at 6:02 PM, Jeff Layton <jlayton at redhat.com> wrote:
> 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.

I am more worried about internal calls to unlink from cifs slipping
through with inode null.  If we check in one branch we should check in
the other, or as you suggest move it to the top

-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list