mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
When setting error to EINVAL in 'fvp == tdvp' case, jump to out label,
because if not, the error will be later overwritten by mac_vnode_check_rename_to() call. Reviewed by: rwatson
This commit is contained in:
parent
4c9839c44e
commit
2765482b7f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182596
@ -3592,8 +3592,10 @@ kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char *new,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fvp == tdvp)
|
if (fvp == tdvp) {
|
||||||
error = EINVAL;
|
error = EINVAL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* If the source is the same as the destination (that is, if they
|
* If the source is the same as the destination (that is, if they
|
||||||
* are links to the same vnode), then there is nothing to do.
|
* are links to the same vnode), then there is nothing to do.
|
||||||
|
Loading…
Reference in New Issue
Block a user