aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/vnode.h
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-01-30 19:17:29 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-02-12 01:02:21 +0000
commitb59a8e63d6bf9092419b7a421c655d0ae2099662 (patch)
treebc59d2f1a5f960afee30030b8f2a48dfece3873c /sys/sys/vnode.h
parent6aed2435c8bf1fa55891c7d30186c9ad91064da8 (diff)
downloadsrc-b59a8e63d6bf9092419b7a421c655d0ae2099662.tar.gz
src-b59a8e63d6bf9092419b7a421c655d0ae2099662.zip
Stop ignoring ERELOOKUP from VOP_INACTIVE()
When possible, relock the vnode and retry inactivation. Only vunref() is required not to drop the vnode lock, so handle it specially by not retrying. This is a part of the efforts to ensure that unlinked not referenced vnode does not prevent inode from reusing. Reviewed by: chs, mckusick Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/sys/vnode.h')
-rw-r--r--sys/sys/vnode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 78fbec1bd0ba..639a16881e09 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -269,6 +269,7 @@ struct xvnode {
#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_UNREF 0x4000 /* vunref, do not drop lock in inactive() */
#define VMP_LAZYLIST 0x0001 /* Vnode is on mnt's lazy list */
@@ -710,7 +711,7 @@ void vgone(struct vnode *vp);
void vhold(struct vnode *);
void vholdnz(struct vnode *);
bool vhold_smr(struct vnode *);
-void vinactive(struct vnode *vp);
+int vinactive(struct vnode *vp);
int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo);
int vtruncbuf(struct vnode *vp, off_t length, int blksize);
void v_inval_buf_range(struct vnode *vp, daddr_t startlbn, daddr_t endlbn,