From fbb8a5e8ec5608b837e3fd521703f5642de04e13 Mon Sep 17 00:00:00 2001 From: rmacklem Date: Sun, 22 May 2011 01:07:54 +0000 Subject: 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 --- sys/fs/nullfs/null_vfsops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/fs/nullfs') diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 7bd4ab7..e39dd8f 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -321,13 +321,15 @@ nullfs_vget(mp, ino, flags, vpp) } static int -nullfs_fhtovp(mp, fidp, vpp) +nullfs_fhtovp(mp, fidp, flags, vpp) struct mount *mp; struct fid *fidp; + int flags; struct vnode **vpp; { int error; - error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, vpp); + error = VFS_FHTOVP(MOUNTTONULLMOUNT(mp)->nullm_vfs, fidp, LK_EXCLUSIVE, + vpp); if (error) return (error); -- cgit v1.1