The branch stable/13 has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=b5eaf005273b5e23db8e83e08b0bd32bbbbe1d53

commit b5eaf005273b5e23db8e83e08b0bd32bbbbe1d53
Author:     Konstantin Belousov <k...@freebsd.org>
AuthorDate: 2021-07-17 22:56:47 +0000
Commit:     Konstantin Belousov <k...@freebsd.org>
CommitDate: 2021-08-03 09:52:35 +0000

    nullfs: provide custom null_advlock bypass
    
    (cherry picked from commit 161e9a97363d17caf0b47983b28a37f3f59f9978)
---
 sys/fs/nullfs/null_vnops.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index 29be2a34614c..4dfc5efaf9ed 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -980,6 +980,28 @@ null_read_pgcache(struct vop_read_pgcache_args *ap)
        return (error);
 }
 
+static int
+null_advlock(struct vop_advlock_args *ap)
+{
+       struct vnode *lvp, *vp;
+       struct null_node *xp;
+       int error;
+
+       vp = ap->a_vp;
+       VI_LOCK(vp);
+       xp = VTONULL(vp);
+       if (xp == NULL) {
+               VI_UNLOCK(vp);
+               return (EBADF);
+       }
+       lvp = xp->null_lowervp;
+       vref(lvp);
+       VI_UNLOCK(vp);
+       error = VOP_ADVLOCK(lvp, ap->a_id, ap->a_op, ap->a_fl, ap->a_flags);
+       vrele(lvp);
+       return (error);
+}
+
 /*
  * Avoid standard bypass, since lower dvp and vp could be no longer
  * valid after vput().
@@ -1035,6 +1057,7 @@ struct vop_vector null_vnodeops = {
        .vop_bypass =           null_bypass,
        .vop_access =           null_access,
        .vop_accessx =          null_accessx,
+       .vop_advlock =          null_advlock,
        .vop_advlockpurge =     vop_stdadvlockpurge,
        .vop_bmap =             VOP_EOPNOTSUPP,
        .vop_stat =             null_stat,
_______________________________________________
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"

Reply via email to