Re: [PATCH] cifs: when renaming don't try to unlink negative dentry
Jeff Layton <[email protected]>
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 17 Apr 2009 16:16:23 -0500 Steve French <[email protected]> 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 <[email protected]>