diff options
author | John Baldwin <jhb@FreeBSD.org> | 2008-11-03 19:33:20 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2008-11-03 19:33:20 +0000 |
commit | 0f54f8c2b3fc4d2723c5c4d3f54e63a753143f3b (patch) | |
tree | 10579f56e2e584f355cb0218b59a10ac39e24785 /sys/kern/vfs_lookup.c | |
parent | 9325b9b23bc91081900811bf2404e83d3c578ba8 (diff) | |
download | src-0f54f8c2b3fc4d2723c5c4d3f54e63a753143f3b.tar.gz src-0f54f8c2b3fc4d2723c5c4d3f54e63a753143f3b.zip |
Notes
Diffstat (limited to 'sys/kern/vfs_lookup.c')
-rw-r--r-- | sys/kern/vfs_lookup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index f009dac4ad65..c3e2e8092e8c 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -331,12 +331,13 @@ namei(struct nameidata *ndp) static int compute_cn_lkflags(struct mount *mp, int lkflags) { + if (mp == NULL || ((lkflags & LK_SHARED) && !(mp->mnt_kern_flag & MNTK_LOOKUP_SHARED))) { lkflags &= ~LK_SHARED; lkflags |= LK_EXCLUSIVE; } - return lkflags; + return (lkflags); } /* |