diff options
| author | Bruce Evans <bde@FreeBSD.org> | 2002-09-10 11:09:13 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 2002-09-10 11:09:13 +0000 |
| commit | d3a7b5e70e4f8338bc2b3556df238e6ffb79a2ae (patch) | |
| tree | fbf60a21a76d1e310c894136153d8d3364de0a27 /sys/kern/vfs_extattr.c | |
| parent | 3e30ca7b1cc48afdaf4fd24adeebe08eaff8a47c (diff) | |
Notes
Diffstat (limited to 'sys/kern/vfs_extattr.c')
| -rw-r--r-- | sys/kern/vfs_extattr.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 3015105a31c7..e1b2d7f4ca2b 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -2744,14 +2744,10 @@ kern_rename(struct thread *td, char *from, char *to, enum uio_seg pathseg) if (fvp == tdvp) error = EINVAL; /* - * If source is the same as the destination (that is the - * same inode number with the same name in the same directory), - * then there is nothing to do. + * 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. */ - if (fvp == tvp && fromnd.ni_dvp == tdvp && - fromnd.ni_cnd.cn_namelen == tond.ni_cnd.cn_namelen && - !bcmp(fromnd.ni_cnd.cn_nameptr, tond.ni_cnd.cn_nameptr, - fromnd.ni_cnd.cn_namelen)) + if (fvp == tvp) error = -1; out: if (!error) { |
