ffs_vfsops.c (50477) | ffs_vfsops.c (51138) |
---|---|
1/* 2 * Copyright (c) 1989, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 | 1/* 2 * Copyright (c) 1989, 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 |
34 * $FreeBSD: head/sys/ufs/ffs/ffs_vfsops.c 50477 1999-08-28 01:08:13Z peter $ | 34 * $FreeBSD: head/sys/ufs/ffs/ffs_vfsops.c 51138 1999-09-11 00:46:08Z alfred $ |
35 */ 36 37#include "opt_quota.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/namei.h> 42#include <sys/proc.h> --- 32 unchanged lines hidden (view full) --- 75 ufs_start, 76 ffs_unmount, 77 ufs_root, 78 ufs_quotactl, 79 ffs_statfs, 80 ffs_sync, 81 ffs_vget, 82 ffs_fhtovp, | 35 */ 36 37#include "opt_quota.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/namei.h> 42#include <sys/proc.h> --- 32 unchanged lines hidden (view full) --- 75 ufs_start, 76 ffs_unmount, 77 ufs_root, 78 ufs_quotactl, 79 ffs_statfs, 80 ffs_sync, 81 ffs_vget, 82 ffs_fhtovp, |
83 ufs_check_export, |
|
83 ffs_vptofh, 84 ffs_init, 85}; 86 87VFS_SET(ufs_vfsops, ufs, 0); 88 89/* 90 * ffs_mount --- 1081 unchanged lines hidden (view full) --- 1172 * Have to be really careful about stale file handles: 1173 * - check that the inode number is valid 1174 * - call ffs_vget() to get the locked inode 1175 * - check for an unallocated inode (i_mode == 0) 1176 * - check that the given client host has export rights and return 1177 * those rights via. exflagsp and credanonp 1178 */ 1179int | 84 ffs_vptofh, 85 ffs_init, 86}; 87 88VFS_SET(ufs_vfsops, ufs, 0); 89 90/* 91 * ffs_mount --- 1081 unchanged lines hidden (view full) --- 1173 * Have to be really careful about stale file handles: 1174 * - check that the inode number is valid 1175 * - call ffs_vget() to get the locked inode 1176 * - check for an unallocated inode (i_mode == 0) 1177 * - check that the given client host has export rights and return 1178 * those rights via. exflagsp and credanonp 1179 */ 1180int |
1180ffs_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp) | 1181ffs_fhtovp(mp, fhp, vpp) |
1181 register struct mount *mp; 1182 struct fid *fhp; | 1182 register struct mount *mp; 1183 struct fid *fhp; |
1183 struct sockaddr *nam; | |
1184 struct vnode **vpp; | 1184 struct vnode **vpp; |
1185 int *exflagsp; 1186 struct ucred **credanonp; | |
1187{ 1188 register struct ufid *ufhp; 1189 struct fs *fs; 1190 1191 ufhp = (struct ufid *)fhp; 1192 fs = VFSTOUFS(mp)->um_fs; 1193 if (ufhp->ufid_ino < ROOTINO || 1194 ufhp->ufid_ino >= fs->fs_ncg * fs->fs_ipg) 1195 return (ESTALE); | 1185{ 1186 register struct ufid *ufhp; 1187 struct fs *fs; 1188 1189 ufhp = (struct ufid *)fhp; 1190 fs = VFSTOUFS(mp)->um_fs; 1191 if (ufhp->ufid_ino < ROOTINO || 1192 ufhp->ufid_ino >= fs->fs_ncg * fs->fs_ipg) 1193 return (ESTALE); |
1196 return (ufs_check_export(mp, ufhp, nam, vpp, exflagsp, credanonp)); | 1194 return (ufs_fhtovp(mp, ufhp, vpp)); |
1197} 1198 1199/* 1200 * Vnode pointer to File handle 1201 */ 1202/* ARGSUSED */ 1203int 1204ffs_vptofh(vp, fhp) --- 89 unchanged lines hidden --- | 1195} 1196 1197/* 1198 * Vnode pointer to File handle 1199 */ 1200/* ARGSUSED */ 1201int 1202ffs_vptofh(vp, fhp) --- 89 unchanged lines hidden --- |