parent
65de5d71a9
commit
426cddbb30
|
|
@ -321,8 +321,11 @@ PUBLIC int fs_rename()
|
||||||
old_ip = NULL;
|
old_ip = NULL;
|
||||||
if (r == EENTERMOUNT) r = EXDEV; /* should this fail at all? */
|
if (r == EENTERMOUNT) r = EXDEV; /* should this fail at all? */
|
||||||
else if (r == ELEAVEMOUNT) r = EINVAL; /* rename on dot-dot */
|
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 */
|
/* Get new dir inode */
|
||||||
|
|
@ -349,10 +352,7 @@ PUBLIC int fs_rename()
|
||||||
r = EBUSY;
|
r = EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(old_ip != NULL)
|
odir = ((old_ip->i_mode & I_TYPE) == I_DIRECTORY); /* TRUE iff dir */
|
||||||
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 it is ok, check for a variety of possible errors. */
|
||||||
if(r == OK) {
|
if(r == OK) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user