From 18d0a0dd51c7995ce9e549616f78ef724096b1bd Mon Sep 17 00:00:00 2001 From: attilio Date: Thu, 10 Jan 2008 01:10:58 +0000 Subject: vn_lock() is currently only used with the 'curthread' passed as argument. Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and in particular remove an annoying dependence helping next lockmgr() cleanup. KPI results, obviously, changed. Manpage and FreeBSD_version will be updated through further commits. As a side note, would be valuable to say that next commits will address a similar cleanup about VFS methods, in particular vop_lock1 and vop_unlock. Tested by: Diego Sardina , Andrea Di Pasquale --- sys/fs/cd9660/cd9660_lookup.c | 2 +- sys/fs/cd9660/cd9660_vfsops.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/fs/cd9660') diff --git a/sys/fs/cd9660/cd9660_lookup.c b/sys/fs/cd9660/cd9660_lookup.c index 3d177c4..ddaf8dd 100644 --- a/sys/fs/cd9660/cd9660_lookup.c +++ b/sys/fs/cd9660/cd9660_lookup.c @@ -354,7 +354,7 @@ found: LK_EXCLUSIVE, &tdp, saved_ino != ino, ep); brelse(bp); - vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY, td); + vn_lock(pdp, LK_EXCLUSIVE | LK_RETRY); if (error) return (error); *vpp = tdp; diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 651765e..a63f3d6 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -170,7 +170,7 @@ cd9660_mount(struct mount *mp, struct thread *td) * or has superuser abilities */ accessmode = VREAD; - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td); if (error) error = priv_check(td, PRIV_VFS_MOUNT_PERM); @@ -224,7 +224,7 @@ iso_mountfs(devvp, mp, td) struct bufobj *bo; char *cs_local, *cs_disk; - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); DROP_GIANT(); g_topology_lock(); error = g_vfs_open(devvp, &cp, "cd9660", 0); -- cgit v1.1