summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_lookup.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2009-05-11 15:33:26 +0000
committerattilio <attilio@FreeBSD.org>2009-05-11 15:33:26 +0000
commit1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0 (patch)
tree6591f00318da636f44a6ceb26f517e7795eb1b44 /sys/kern/vfs_lookup.c
parentebcb20267286e4ffadb3f603af56bd7a1df1f422 (diff)
downloadFreeBSD-src-1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0.zip
FreeBSD-src-1dcb84131b6679f5d53452314d4ca1dfe2d8c5f0.tar.gz
Remove the thread argument from the FSD (File-System Dependent) parts of
the VFS. Now all the VFS_* functions and relating parts don't want the context as long as it always refers to curthread. In some points, in particular when dealing with VOPs and functions living in the same namespace (eg. vflush) which still need to be converted, pass curthread explicitly in order to retain the old behaviour. Such loose ends will be fixed ASAP. While here fix a bug: now, UFS_EXTATTR can be compiled alone without the UFS_EXTATTR_AUTOSTART option. VFS KPI is heavilly changed by this commit so thirdy parts modules needs to be recompiled. Bump __FreeBSD_version in order to signal such situation.
Diffstat (limited to 'sys/kern/vfs_lookup.c')
-rw-r--r--sys/kern/vfs_lookup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 757e56e..6dbb8d0 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -453,7 +453,6 @@ lookup(struct nameidata *ndp)
int error = 0;
int dpunlocked = 0; /* dp has already been unlocked */
struct componentname *cnp = &ndp->ni_cnd;
- struct thread *td = cnp->cn_thread;
int vfslocked; /* VFS Giant state for child */
int dvfslocked; /* VFS Giant state for parent */
int tvfslocked;
@@ -637,7 +636,8 @@ dirloop:
unionlookup:
#ifdef MAC
if ((cnp->cn_flags & NOMACCHECK) == 0) {
- error = mac_vnode_check_lookup(td->td_ucred, dp, cnp);
+ error = mac_vnode_check_lookup(cnp->cn_thread->td_ucred, dp,
+ cnp);
if (error)
goto bad;
}
@@ -758,7 +758,8 @@ unionlookup:
dvfslocked = 0;
vref(vp_crossmp);
ndp->ni_dvp = vp_crossmp;
- error = VFS_ROOT(mp, compute_cn_lkflags(mp, cnp->cn_lkflags), &tdp, td);
+ error = VFS_ROOT(mp, compute_cn_lkflags(mp, cnp->cn_lkflags),
+ &tdp);
vfs_unbusy(mp);
if (vn_lock(vp_crossmp, LK_SHARED | LK_NOWAIT))
panic("vp_crossmp exclusively locked or reclaimed");
OpenPOWER on IntegriCloud