aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2023-06-21 16:37:30 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2023-07-04 03:06:46 +0000
commitbe9fd6f1f283e2ba11916dbb75dc1823cc25b24f (patch)
tree69ecb65a9fbd407dba7c0eb77a9c15eb183fe84a
parent109230f383ac5a60a7bd4e40bbde361c28c430cf (diff)
downloadsrc-be9fd6f1f283e2ba11916dbb75dc1823cc25b24f.tar.gz
src-be9fd6f1f283e2ba11916dbb75dc1823cc25b24f.zip
VFS: Remove VV_READLINK flag
(cherry picked from commit 4a402dfe0bc44770c9eac6e58a501e4805e29413)
-rw-r--r--sys/kern/vfs_subr.c5
-rw-r--r--sys/kern/vfs_syscalls.c2
-rw-r--r--sys/sys/vnode.h2
3 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 2002f3b81937..dd742277a98f 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -4263,12 +4263,9 @@ vn_printf(struct vnode *vp, const char *fmt, ...)
strlcat(buf, "|VV_MD", sizeof(buf));
if (vp->v_vflag & VV_FORCEINSMQ)
strlcat(buf, "|VV_FORCEINSMQ", sizeof(buf));
- if (vp->v_vflag & VV_READLINK)
- strlcat(buf, "|VV_READLINK", sizeof(buf));
flags = vp->v_vflag & ~(VV_ROOT | VV_ISTTY | VV_NOSYNC | VV_ETERNALDEV |
VV_CACHEDLABEL | VV_VMSIZEVNLOCK | VV_COPYONWRITE | VV_SYSTEM |
- VV_PROCDEP | VV_NOKNOTE | VV_DELETED | VV_MD | VV_FORCEINSMQ |
- VV_READLINK);
+ VV_PROCDEP | VV_NOKNOTE | VV_DELETED | VV_MD | VV_FORCEINSMQ);
if (flags != 0) {
snprintf(buf2, sizeof(buf2), "|VV(0x%lx)", flags);
strlcat(buf, buf2, sizeof(buf));
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 7f7836450811..b7cdac8540da 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -2660,7 +2660,7 @@ kern_readlink_vp(struct vnode *vp, char *buf, enum uio_seg bufseg, size_t count,
if (error != 0)
return (error);
#endif
- if (vp->v_type != VLNK && (vp->v_vflag & VV_READLINK) == 0)
+ if (vp->v_type != VLNK)
return (EINVAL);
aiov.iov_base = buf;
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 543eb06f2f16..82e9ba9a2237 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -271,7 +271,7 @@ struct xvnode {
#define VV_DELETED 0x0400 /* should be removed */
#define VV_MD 0x0800 /* vnode backs the md device */
#define VV_FORCEINSMQ 0x1000 /* force the insmntque to succeed */
-#define VV_READLINK 0x2000 /* fdescfs linux vnode */
+#define VV_UNUSED01 0x2000 /* was: fdescfs linux vnode */
#define VV_UNREF 0x4000 /* vunref, do not drop lock in inactive() */
#define VV_UNLINKED 0x8000 /* unlinked but stil open directory */