diff options
author | pjd <pjd@FreeBSD.org> | 2007-05-06 01:27:54 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-05-06 01:27:54 +0000 |
commit | a360ad79b03fc86ad14ee529259ec67558935c3c (patch) | |
tree | 5cb534aa280b5310b62f06663d728340b3bcc9af /sys/contrib | |
parent | cf2d754ee013fab9ecb799bb5d103c0d3aac0e94 (diff) | |
download | FreeBSD-src-a360ad79b03fc86ad14ee529259ec67558935c3c.zip FreeBSD-src-a360ad79b03fc86ad14ee529259ec67558935c3c.tar.gz |
MFp4: We don't need to cover vnode_pager_setsize() with the z_map_lock.
Diffstat (limited to 'sys/contrib')
-rw-r--r-- | sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 711321a..d3e56fa 100644 --- a/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -770,11 +770,12 @@ zfs_write(vnode_t *vp, uio_t *uio, int ioflag, cred_t *cr, caller_context_t *ct) * Perhaps we should use SPA_MAXBLOCKSIZE chunks? */ nbytes = MIN(n, max_blksz - P2PHASE(woff, max_blksz)); - rw_enter(&zp->z_map_lock, RW_READER); if (woff + nbytes > zp->z_phys->zp_size) vnode_pager_setsize(vp, woff + nbytes); + rw_enter(&zp->z_map_lock, RW_READER); + tx_bytes = uio->uio_resid; if (vn_has_cached_data(vp)) { rw_exit(&zp->z_map_lock); |