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]> |
> + /* Try unlinking the target dentry if it's not negative */
> + if (target_dentry->d_inode && (rc == -EACCES || rc == -EEXIST)) {
That comment is rather confusing to the reader. A negative dentry
is a Linux implementation detail. What is really mean here is "delete
the target if it exists".
Also cifs_rename for that case seems like it's not atomic as required
by posix, as cifs_do_rename might fail after the target has been removed
already.
Mail servers won't be very happy on cifs :)