summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-02-15 22:08:35 +0000
committerpjd <pjd@FreeBSD.org>2007-02-15 22:08:35 +0000
commitcb2d7c85a85791923bd76d6e730efe888d456b05 (patch)
treed0649ac0ff4a69d709b0c801322ed78174e44d1c /sys/nfsserver
parent8442403943388cc79bc6f4b7d43bfe916ee194ef (diff)
downloadFreeBSD-src-cb2d7c85a85791923bd76d6e730efe888d456b05.zip
FreeBSD-src-cb2d7c85a85791923bd76d6e730efe888d456b05.tar.gz
Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.
This way we may support multiple structures in v_data vnode field within one file system without using black magic. Vnode-to-file-handle should be VOP in the first place, but was made VFS operation to keep interface as compatible as possible with SUN's VFS. BTW. Now Solaris also implements vnode-to-file-handle as VOP operation. VFS_VPTOFH() was left for API backward compatibility, but is marked for removal before 8.0-RELEASE. Approved by: mckusick Discussed with: many (on IRC) Tested with: ufs, msdosfs, cd9660, nullfs and zfs
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_serv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 9418672..4b5ba21 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -634,7 +634,7 @@ nfsrv_lookup(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
vp = ndp->ni_vp;
bzero((caddr_t)fhp, sizeof(nfh));
fhp->fh_fsid = vp->v_mount->mnt_stat.f_fsid;
- error = VFS_VPTOFH(vp, &fhp->fh_fid);
+ error = VOP_VPTOFH(vp, &fhp->fh_fid);
if (!error)
error = VOP_GETATTR(vp, vap, cred, td);
@@ -1977,7 +1977,7 @@ nfsrv_create(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
if (!error) {
bzero((caddr_t)fhp, sizeof(nfh));
fhp->fh_fsid = nd.ni_vp->v_mount->mnt_stat.f_fsid;
- error = VFS_VPTOFH(nd.ni_vp, &fhp->fh_fid);
+ error = VOP_VPTOFH(nd.ni_vp, &fhp->fh_fid);
if (!error)
error = VOP_GETATTR(nd.ni_vp, vap, cred, td);
}
@@ -2205,7 +2205,7 @@ out:
if (!error) {
bzero((caddr_t)fhp, sizeof(nfh));
fhp->fh_fsid = vp->v_mount->mnt_stat.f_fsid;
- error = VFS_VPTOFH(vp, &fhp->fh_fid);
+ error = VOP_VPTOFH(vp, &fhp->fh_fid);
if (!error)
error = VOP_GETATTR(vp, vap, cred, td);
}
@@ -2952,7 +2952,7 @@ nfsrv_symlink(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
if (error == 0) {
bzero((caddr_t)fhp, sizeof(nfh));
fhp->fh_fsid = nd.ni_vp->v_mount->mnt_stat.f_fsid;
- error = VFS_VPTOFH(nd.ni_vp, &fhp->fh_fid);
+ error = VOP_VPTOFH(nd.ni_vp, &fhp->fh_fid);
if (!error)
error = VOP_GETATTR(nd.ni_vp, vap, cred,
td);
@@ -3130,7 +3130,7 @@ nfsrv_mkdir(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
if (!error) {
bzero((caddr_t)fhp, sizeof(nfh));
fhp->fh_fsid = nd.ni_vp->v_mount->mnt_stat.f_fsid;
- error = VFS_VPTOFH(nd.ni_vp, &fhp->fh_fid);
+ error = VOP_VPTOFH(nd.ni_vp, &fhp->fh_fid);
if (!error)
error = VOP_GETATTR(nd.ni_vp, vap, cred, td);
}
@@ -3947,7 +3947,7 @@ again:
*/
KASSERT(nvp->v_mount == vp->v_mount,
("nfsrv_readdirplus: nvp mount != vp mount"));
- if (VFS_VPTOFH(nvp, &nfhp->fh_fid)) {
+ if (VOP_VPTOFH(nvp, &nfhp->fh_fid)) {
vput(nvp);
nvp = NULL;
goto invalid;
OpenPOWER on IntegriCloud