From: charles Date: Wed, 21 Sep 2005 01:14:03 +0000 (+0000) Subject: Fix problem introduced my mv over fix X-Git-Tag: pre-name-change~399 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=ebbb972045bc371415021256d2a20c7b7af84457;ds=sidebyside Fix problem introduced my mv over fix --- diff --git a/yaffs_fs.c b/yaffs_fs.c index fcf111e..0a7c396 100644 --- a/yaffs_fs.c +++ b/yaffs_fs.c @@ -31,7 +31,7 @@ */ 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 @@ -1133,8 +1133,10 @@ static int yaffs_rename(struct inode *old_dir, struct dentry *old_dentry, 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 {