diff options
author | Peter Holm <pho@FreeBSD.org> | 2011-10-24 10:35:37 +0000 |
---|---|---|
committer | Peter Holm <pho@FreeBSD.org> | 2011-10-24 10:35:37 +0000 |
commit | 9ce7379778e7db8354fc0eba26bebf8ba4341e93 (patch) | |
tree | fe2a6aa3f54ab06a30ed5c37e065fd298965e384 /sys | |
parent | c779dc1485085ae8838cd993ed84680e6bb159ed (diff) | |
download | src-9ce7379778e7db8354fc0eba26bebf8ba4341e93.tar.gz src-9ce7379778e7db8354fc0eba26bebf8ba4341e93.zip |
Only unlock if the lock is exclusive.
Reported by: Subbsd <subbsd gmail com>
Discussed with: kib
Notes
Notes:
svn path=/head/; revision=226681
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index e39dd8f892c4..97f8f133b051 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -104,11 +104,10 @@ nullfs_mount(struct mount *mp) return (EINVAL); /* - * Unlock lower node to avoid deadlock. - * (XXX) VOP_ISLOCKED is needed? + * Unlock lower node to avoid possible deadlock. */ if ((mp->mnt_vnodecovered->v_op == &null_vnodeops) && - VOP_ISLOCKED(mp->mnt_vnodecovered)) { + VOP_ISLOCKED(mp->mnt_vnodecovered) == LK_EXCLUSIVE) { VOP_UNLOCK(mp->mnt_vnodecovered, 0); isvnunlocked = 1; } |