mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Fix for a potential bug caught by Coverity. Pointed out to me by Kris Kennaway.
This commit is contained in:
parent
7410947271
commit
3c5b80d6c2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162310
@ -306,7 +306,8 @@ namei(struct nameidata *ndp)
|
||||
static int
|
||||
compute_cn_lkflags(struct mount *mp, int lkflags)
|
||||
{
|
||||
if ((lkflags & LK_SHARED) && !(mp->mnt_kern_flag & MNTK_LOOKUP_SHARED)) {
|
||||
if (mp == NULL ||
|
||||
((lkflags & LK_SHARED) && !(mp->mnt_kern_flag & MNTK_LOOKUP_SHARED))) {
|
||||
lkflags &= ~LK_SHARED;
|
||||
lkflags |= LK_EXCLUSIVE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user