diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2011-05-22 01:07:54 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2011-05-22 01:07:54 +0000 |
commit | fbb8a5e8ec5608b837e3fd521703f5642de04e13 (patch) | |
tree | d4de50d8fbaaca75e31ae95cbc9c63c287ea95d9 /sys/sys/mount.h | |
parent | 3dd8ae4222dacd974bc67c89db57fbe97d36ed79 (diff) | |
download | FreeBSD-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/sys/mount.h')
-rw-r--r-- | sys/sys/mount.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 231e3d6..d636607 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -566,7 +566,8 @@ typedef int vfs_statfs_t(struct mount *mp, struct statfs *sbp); typedef int vfs_sync_t(struct mount *mp, int waitfor); typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags, struct vnode **vpp); -typedef int vfs_fhtovp_t(struct mount *mp, struct fid *fhp, struct vnode **vpp); +typedef int vfs_fhtovp_t(struct mount *mp, struct fid *fhp, + int flags, struct vnode **vpp); typedef int vfs_checkexp_t(struct mount *mp, struct sockaddr *nam, int *extflagsp, struct ucred **credanonp, int *numsecflavors, int **secflavors); @@ -610,8 +611,8 @@ vfs_statfs_t __vfs_statfs; #define VFS_SYNC(MP, WAIT) (*(MP)->mnt_op->vfs_sync)(MP, WAIT) #define VFS_VGET(MP, INO, FLAGS, VPP) \ (*(MP)->mnt_op->vfs_vget)(MP, INO, FLAGS, VPP) -#define VFS_FHTOVP(MP, FIDP, VPP) \ - (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, VPP) +#define VFS_FHTOVP(MP, FIDP, FLAGS, VPP) \ + (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, FLAGS, VPP) #define VFS_CHECKEXP(MP, NAM, EXFLG, CRED, NUMSEC, SEC) \ (*(MP)->mnt_op->vfs_checkexp)(MP, NAM, EXFLG, CRED, NUMSEC, SEC) #define VFS_EXTATTRCTL(MP, C, FN, NS, N) \ |