Comment 8 for bug 315782

Revision history for this message
Nicklas W Bjurman (lordmetroid) wrote :

I posed a question where to begin digging on the Linux kernel mailing list, the filesystem maintainer, OGAWA Hirofumi replied as below:

This is known issue for case-insensitive fs. (BTW, CI is case-insensitive).

To allow rename("filename", "FILENAME"), we have to fix two issues. One
is vfs_rename(), it doesn't call ->rename handler if inodes was same.

Another one is fs handlers, it has to handle dentry->d_name change while
someone is using it, and/or it has to care about dentry alias. Because,
the inode of both of names is same, and dentry should/may be same.

BTW, those is kernel side issues. There is some userland issues too
(e.g. IIRC, "mv" command check stat->st_ino before call rename(2)).

I also believe http://lxr.linux.no/linux+v2.6.28.2/fs/fat/namei_vfat.c#L53 is a key element to this bug.