summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2006-04-18 08:05:08 +0000
committerdelphij <delphij@FreeBSD.org>2006-04-18 08:05:08 +0000
commit0c90800cc68dbc996e5e2c5ff15d88797a7b4724 (patch)
treeab04114269242e3560b181769bb1eccd44671909 /sys/kern
parentb591c1981835cde1d8ba2d9f053ec25c8c7656d6 (diff)
downloadFreeBSD-src-0c90800cc68dbc996e5e2c5ff15d88797a7b4724.zip
FreeBSD-src-0c90800cc68dbc996e5e2c5ff15d88797a7b4724.tar.gz
In vfs_hash_get(): mount point should never be changed
so explicitly constify the mp parameter. Reviewed by: phk
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_hash.c b/sys/kern/vfs_hash.c
index 5523c56..80c2dc5 100644
--- a/sys/kern/vfs_hash.c
+++ b/sys/kern/vfs_hash.c
@@ -55,14 +55,14 @@ vfs_hashinit(void *dummy __unused)
SYSINIT(vfs_hash, SI_SUB_VFS, SI_ORDER_SECOND, vfs_hashinit, NULL)
static struct vfs_hash_head *
-vfs_hash_index(struct mount *mp, u_int hash)
+vfs_hash_index(const struct mount *mp, u_int hash)
{
return(&vfs_hash_tbl[(hash + mp->mnt_hashseed) & vfs_hash_mask]);
}
int
-vfs_hash_get(struct mount *mp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg)
+vfs_hash_get(const struct mount *mp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg)
{
struct vnode *vp;
int error;
OpenPOWER on IntegriCloud