diff options
author | jhb <jhb@FreeBSD.org> | 2009-02-13 18:18:14 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-02-13 18:18:14 +0000 |
commit | 26e338d6fc4cd60255a131cdf285a3c2cb66cea4 (patch) | |
tree | 059be0daffb9368cf7dc8f5d8a29ff30ea6391fb /sys/i386 | |
parent | 482df37a9ec093145af5d2f758f6e565fba7980d (diff) | |
download | FreeBSD-src-26e338d6fc4cd60255a131cdf285a3c2cb66cea4.zip FreeBSD-src-26e338d6fc4cd60255a131cdf285a3c2cb66cea4.tar.gz |
Use shared vnode locks when invoking VOP_READDIR().
MFC after: 1 month
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_misc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/ibcs2/ibcs2_misc.c b/sys/i386/ibcs2/ibcs2_misc.c index 18b6459..7faf675 100644 --- a/sys/i386/ibcs2/ibcs2_misc.c +++ b/sys/i386/ibcs2/ibcs2_misc.c @@ -356,7 +356,7 @@ ibcs2_getdents(td, uap) buflen = max(DIRBLKSIZ, uap->nbytes); buflen = min(buflen, MAXBSIZE); buf = malloc(buflen, M_TEMP, M_WAITOK); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(vp, LK_SHARED | LK_RETRY); again: aiov.iov_base = buf; aiov.iov_len = buflen; @@ -518,7 +518,7 @@ ibcs2_read(td, uap) buflen = max(DIRBLKSIZ, uap->nbytes); buflen = min(buflen, MAXBSIZE); buf = malloc(buflen, M_TEMP, M_WAITOK); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(vp, LK_SHARED | LK_RETRY); again: aiov.iov_base = buf; aiov.iov_len = buflen; |