Add missing put_inode().

Fixes bug from a9a45cddc.
This commit is contained in:
Evgeniy Ivanov 2011-08-12 21:40:52 +04:00 committed by Ben Gras
parent 65de5d71a9
commit 426cddbb30

View file

@ -321,8 +321,11 @@ PUBLIC int fs_rename()
old_ip = NULL;
if (r == EENTERMOUNT) r = EXDEV; /* should this fail at all? */
else if (r == ELEAVEMOUNT) r = EINVAL; /* rename on dot-dot */
} else if (old_ip == NULL) {
return(err_code);
}
if (old_ip == NULL) {
put_inode(old_dirp);
return(r);
}
/* Get new dir inode */
@ -349,10 +352,7 @@ PUBLIC int fs_rename()
r = EBUSY;
}
if(old_ip != NULL)
odir = ((old_ip->i_mode & I_TYPE) == I_DIRECTORY); /* TRUE iff dir */
else
odir = FALSE;
/* If it is ok, check for a variety of possible errors. */
if(r == OK) {