fs: rename the mountpoint should go through pseudorename branch
to avoid this type of error: mount -t procfs /a/b mv /a/b / mv: rename failed: 88 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
8602e46d4a
commit
59fbd35609
@ -513,7 +513,7 @@ int rename(FAR const char *oldpath, FAR const char *newpath)
|
|||||||
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
#ifndef CONFIG_DISABLE_MOUNTPOINT
|
||||||
/* Verify that the old inode is a valid mountpoint. */
|
/* Verify that the old inode is a valid mountpoint. */
|
||||||
|
|
||||||
if (INODE_IS_MOUNTPT(oldinode))
|
if (INODE_IS_MOUNTPT(oldinode) && *olddesc.relpath != '\0')
|
||||||
{
|
{
|
||||||
ret = mountptrename(oldpath, oldinode, olddesc.relpath, newpath);
|
ret = mountptrename(oldpath, oldinode, olddesc.relpath, newpath);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user