Deleted Added
full compact
ffs_vfsops.c (219804) ffs_vfsops.c (222167)
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

--- 16 unchanged lines hidden (view full) ---

25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95
30 */
31
32#include <sys/cdefs.h>
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

--- 16 unchanged lines hidden (view full) ---

25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_vfsops.c 219804 2011-03-20 21:05:09Z kib $");
33__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_vfsops.c 222167 2011-05-22 01:07:54Z rmacklem $");
34
35#include "opt_quota.h"
36#include "opt_ufs.h"
37#include "opt_ffs.h"
38#include "opt_ddb.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>

--- 1593 unchanged lines hidden (view full) ---

1635 * Have to be really careful about stale file handles:
1636 * - check that the inode number is valid
1637 * - call ffs_vget() to get the locked inode
1638 * - check for an unallocated inode (i_mode == 0)
1639 * - check that the given client host has export rights and return
1640 * those rights via. exflagsp and credanonp
1641 */
1642static int
34
35#include "opt_quota.h"
36#include "opt_ufs.h"
37#include "opt_ffs.h"
38#include "opt_ddb.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>

--- 1593 unchanged lines hidden (view full) ---

1635 * Have to be really careful about stale file handles:
1636 * - check that the inode number is valid
1637 * - call ffs_vget() to get the locked inode
1638 * - check for an unallocated inode (i_mode == 0)
1639 * - check that the given client host has export rights and return
1640 * those rights via. exflagsp and credanonp
1641 */
1642static int
1643ffs_fhtovp(mp, fhp, vpp)
1643ffs_fhtovp(mp, fhp, flags, vpp)
1644 struct mount *mp;
1645 struct fid *fhp;
1644 struct mount *mp;
1645 struct fid *fhp;
1646 int flags;
1646 struct vnode **vpp;
1647{
1648 struct ufid *ufhp;
1649 struct fs *fs;
1650
1651 ufhp = (struct ufid *)fhp;
1652 fs = VFSTOUFS(mp)->um_fs;
1653 if (ufhp->ufid_ino < ROOTINO ||
1654 ufhp->ufid_ino >= fs->fs_ncg * fs->fs_ipg)
1655 return (ESTALE);
1647 struct vnode **vpp;
1648{
1649 struct ufid *ufhp;
1650 struct fs *fs;
1651
1652 ufhp = (struct ufid *)fhp;
1653 fs = VFSTOUFS(mp)->um_fs;
1654 if (ufhp->ufid_ino < ROOTINO ||
1655 ufhp->ufid_ino >= fs->fs_ncg * fs->fs_ipg)
1656 return (ESTALE);
1656 return (ufs_fhtovp(mp, ufhp, vpp));
1657 return (ufs_fhtovp(mp, ufhp, flags, vpp));
1657}
1658
1659/*
1660 * Initialize the filesystem.
1661 */
1662static int
1663ffs_init(vfsp)
1664 struct vfsconf *vfsp;

--- 397 unchanged lines hidden ---
1658}
1659
1660/*
1661 * Initialize the filesystem.
1662 */
1663static int
1664ffs_init(vfsp)
1665 struct vfsconf *vfsp;

--- 397 unchanged lines hidden ---