summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-05-22 01:07:54 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-05-22 01:07:54 +0000
commitfbb8a5e8ec5608b837e3fd521703f5642de04e13 (patch)
treed4de50d8fbaaca75e31ae95cbc9c63c287ea95d9 /sys/ufs
parent3dd8ae4222dacd974bc67c89db57fbe97d36ed79 (diff)
downloadFreeBSD-src-fbb8a5e8ec5608b837e3fd521703f5642de04e13.zip
FreeBSD-src-fbb8a5e8ec5608b837e3fd521703f5642de04e13.tar.gz
Add a lock flags argument to the VFS_FHTOVP() file system
method, so that callers can indicate the minimum vnode locking requirement. This will allow some file systems to choose to return a LK_SHARED locked vnode when LK_SHARED is specified for the flags argument. This patch only adds the flag. It does not change any file system to use it and all callers specify LK_EXCLUSIVE, so file system semantics are not changed. Reviewed by: kib
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c5
-rw-r--r--sys/ufs/ufs/ufs_extern.h2
-rw-r--r--sys/ufs/ufs/ufs_vfsops.c3
3 files changed, 6 insertions, 4 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 573c364..68b9619 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1640,9 +1640,10 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags)
* those rights via. exflagsp and credanonp
*/
static int
-ffs_fhtovp(mp, fhp, vpp)
+ffs_fhtovp(mp, fhp, flags, vpp)
struct mount *mp;
struct fid *fhp;
+ int flags;
struct vnode **vpp;
{
struct ufid *ufhp;
@@ -1653,7 +1654,7 @@ ffs_fhtovp(mp, fhp, vpp)
if (ufhp->ufid_ino < ROOTINO ||
ufhp->ufid_ino >= fs->fs_ncg * fs->fs_ipg)
return (ESTALE);
- return (ufs_fhtovp(mp, ufhp, vpp));
+ return (ufs_fhtovp(mp, ufhp, flags, vpp));
}
/*
diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h
index 528b03b..c590748 100644
--- a/sys/ufs/ufs/ufs_extern.h
+++ b/sys/ufs/ufs/ufs_extern.h
@@ -56,7 +56,7 @@ extern struct vop_vector ufs_vnodeops;
int ufs_bmap(struct vop_bmap_args *);
int ufs_bmaparray(struct vnode *, ufs2_daddr_t, ufs2_daddr_t *,
struct buf *, int *, int *);
-int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **);
+int ufs_fhtovp(struct mount *, struct ufid *, int, struct vnode **);
int ufs_checkpath(ino_t, ino_t, struct inode *, struct ucred *, ino_t *);
void ufs_dirbad(struct inode *, doff_t, char *);
int ufs_dirbadentry(struct vnode *, struct direct *, int);
diff --git a/sys/ufs/ufs/ufs_vfsops.c b/sys/ufs/ufs/ufs_vfsops.c
index 0eeb14f..b71fc16 100644
--- a/sys/ufs/ufs/ufs_vfsops.c
+++ b/sys/ufs/ufs/ufs_vfsops.c
@@ -208,9 +208,10 @@ ufs_uninit(vfsp)
* Call the VFS_CHECKEXP beforehand to verify access.
*/
int
-ufs_fhtovp(mp, ufhp, vpp)
+ufs_fhtovp(mp, ufhp, flags, vpp)
struct mount *mp;
struct ufid *ufhp;
+ int flags;
struct vnode **vpp;
{
struct inode *ip;
OpenPOWER on IntegriCloud