Re: Re: [PATCH] cifs: when renaming don't try to unlink negative dentry
Christoph Hellwig <[email protected]>
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Apr 18, 2009 at 03:32:02PM -0400, Jeff Layton wrote: > I don't think we can reasonably have cifs_unlink handle the case where > we have a negative dentry. That will add a lot of complexity to this > codepath (and it's already very complex as it is). We have to recognize > that cifs_unlink does more than just SMB_Delete_File. It'll try to do a > busy file rename in some cases, the delete on close bit, etc. > > If the caller just wants a simple SMB_Delete_File attempt then it > should just do that call itself. > > That said, I don't feel terribly strongly about the BUG() call. If you > think it's better to just pop a printk and have cifs_unlink immediately > return an error then I can live with that. Please put the BUG_ON in. The current code is typical cargo-cult programming mess, and the newly added comment ontop of cifs_unlink is highly confusing.