diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2004-05-28 00:10:48 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2004-05-28 00:10:48 +0000 |
commit | 92e6a6c99dd58f92dd4a0538b767de1ddbccda84 (patch) | |
tree | 351967b4f4779cfe86c9c2b92370618af10e1903 /sys | |
parent | 48ad9f76b44c1948e5d688a3048fca52c41903af (diff) |
Make lf_advlock glue work for AFS so flock/fcntl lock requests will work
on the local machine (like NFS). This does not yet implement whole file AFS
locking (arla doesn't do that yet).
ok tedu@ art@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/xfs/xfs_vnodeops-bsd.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/sys/xfs/xfs_vnodeops-bsd.c b/sys/xfs/xfs_vnodeops-bsd.c index 7aee4bb3e0d..cafe22459ca 100644 --- a/sys/xfs/xfs_vnodeops-bsd.c +++ b/sys/xfs/xfs_vnodeops-bsd.c @@ -1185,7 +1185,6 @@ xfs_print (struct vop_print_args *v) int xfs_advlock(struct vop_advlock_args *v) { -#if 0 struct vop_advlock_args /* { struct vnode *a_vp; caddr_t a_id; @@ -1193,30 +1192,12 @@ xfs_advlock(struct vop_advlock_args *v) struct flock *a_fl; int a_flags; } */ *ap = v; - - struct xfs_node *xn = VNODE_TO_XNODE(ap->a_vp); - int ret; - xfs_locktype_t locktype; - -/* if (NNPFS_TOKEN_GOT(xn, */ - - if (ap->a_fl.l_start != 0 || - ap->a_fl.l_end != 0) - printf ("WARN: someone is trying byte-range locking\n"); - - switch (ap->a_op) { - case F_SETLCK: - locktype = NNPFS_READLOCK; - break; - - ret = xfs_advlock_common (xn, ); - - return ret; -#elif defined(HAVE_KERNEL_LF_ADVLOCK) && !defined(__OpenBSD__) && !defined(__APPLE__) +#if defined(HAVE_KERNEL_LF_ADVLOCK) && !defined(__APPLE__) struct xfs_node *xn = VNODE_TO_XNODE(ap->a_vp); - return lf_advlock(ap, &xn->lockf, xn->attr.va_size); - #else + return (lf_advlock(&xn->lockf, xn->attr.va_size, ap->a_id, ap->a_op, + ap->a_fl, ap->a_flags)); +#else return EOPNOTSUPP; #endif } |