Fix problem introduced my mv over fix
authorcharles <charles>
Wed, 21 Sep 2005 01:14:03 +0000 (01:14 +0000)
committercharles <charles>
Wed, 21 Sep 2005 01:14:03 +0000 (01:14 +0000)
yaffs_fs.c

index fcf111e43af1f5390eb81dc8f7494a4b1a05ca70..0a7c39613b9c3aeb0905e180c92231d9bb9e85dd 100644 (file)
@@ -31,7 +31,7 @@
  */
 
 const char *yaffs_fs_c_version =
  */
 
 const char *yaffs_fs_c_version =
-    "$Id: yaffs_fs.c,v 1.30 2005-09-20 05:22:43 charles Exp $";
+    "$Id: yaffs_fs.c,v 1.31 2005-09-21 01:14:03 charles Exp $";
 extern const char *yaffs_guts_c_version;
 
 #include <linux/config.h>
 extern const char *yaffs_guts_c_version;
 
 #include <linux/config.h>
@@ -1133,8 +1133,10 @@ static int yaffs_rename(struct inode *old_dir, struct dentry *old_dentry,
        yaffs_GrossUnlock(dev);
 
        if (retVal == YAFFS_OK) {
        yaffs_GrossUnlock(dev);
 
        if (retVal == YAFFS_OK) {
-               new_dentry->d_inode->i_nlink--;
-               mark_inode_dirty(new_dentry->d_inode);
+               if(target) {
+                       new_dentry->d_inode->i_nlink--;
+                       mark_inode_dirty(new_dentry->d_inode);
+               }
 
                return 0;
        } else {
 
                return 0;
        } else {