I think this should qualify as a serious problem with vfat in 2.0.31.
This small patch fixes it so it will no longer corrupt vfat filesystems.
- Gordon
--- linux-2.0.31-clean/fs/vfat/namei.c Thu Dec 5 10:58:28 1996
+++ linux/fs/vfat/namei.c Mon Nov 17 13:57:06 1997
@@ -1439,10 +1439,13 @@
PRINTK(("vfat_rename 8\n"));
if (res < 0) goto rename_done;
} else {
- PRINTK(("vfat_rename 9\n"));
- res = vfat_unlinkx(new_dir,new_name,new_len,1);
- PRINTK(("vfat_rename 10\n"));
- if (res < 0) goto rename_done;
+ /* Is this the same file, different case? */
+ if (new_inode != old_inode) {
+ PRINTK(("vfat_rename 9\n"));
+ res = vfat_unlinkx(new_dir,new_name,new_len,1);
+ PRINTK(("vfat_rename 10\n"));
+ if (res < 0) goto rename_done;
+ }
}
}