#include <sys/types.h>
#include <sys/errno.h>
#include <sys/modctl.h>
#include <sys/flock.h>
#include <nfs/lm.h>
#include <rpcsvc/nlm_prot.h>
#include "nlm_impl.h"
static struct modlmisc modlmisc = {
&mod_miscops, "lock mgr calls"
};
static struct modlinkage modlinkage = {
MODREV_1, &modlmisc, NULL
};
int
_init()
{
return (mod_install(&modlinkage));
}
int
_fini()
{
return (EBUSY);
}
int
_info(struct modinfo *modinfop)
{
return (mod_info(&modlinkage, modinfop));
}
int
lm_frlock(struct vnode *vp, int cmd, struct flock64 *flk, int flags,
u_offset_t off, struct cred *cr, struct netobj *fh,
struct flk_callback *flcb)
{
return (nlm_frlock(vp, cmd, flk, flags, off,
cr, fh, flcb, NLM_VERS));
}
int
lm4_frlock(struct vnode *vp, int cmd, struct flock64 *flk, int flags,
u_offset_t off, struct cred *cr, struct netobj *fh,
struct flk_callback *flcb)
{
int err;
err = nlm_frlock(vp, cmd, flk, flags, off,
cr, fh, flcb, NLM4_VERS);
return (err);
}
int
lm_shrlock(struct vnode *vp, int cmd,
struct shrlock *shr, int flags, struct netobj *fh)
{
return (nlm_shrlock(vp, cmd, shr, flags, fh, NLM_VERSX));
}
int
lm4_shrlock(struct vnode *vp, int cmd,
struct shrlock *shr, int flags, struct netobj *fh)
{
return (nlm_shrlock(vp, cmd, shr, flags, fh, NLM4_VERS));
}
void
lm_register_lock_locally(struct vnode *vp, struct lm_sysid *ls,
struct flock64 *flk, int flags, u_offset_t offset)
{
nlm_register_lock_locally(vp, (struct nlm_host *)ls,
flk, flags, offset);
}
void
lm_nlm_dispatch(struct svc_req *req, SVCXPRT *xprt)
{
_NOTE(ARGUNUSED(req, xprt))
}
void
lm_nlm4_dispatch(struct svc_req *req, SVCXPRT *xprt)
{
_NOTE(ARGUNUSED(req, xprt))
}
void
lm_nlm_reclaim(struct vnode *vp, struct flock64 *flkp)
{
_NOTE(ARGUNUSED(vp, flkp))
}
void
lm_nlm4_reclaim(struct vnode *vp, struct flock64 *flkp)
{
_NOTE(ARGUNUSED(vp, flkp))
}