MFp4: We don't need to cover vnode_pager_setsize() with the z_map_lock.
This commit is contained in:
parent
433c2705cd
commit
fab3f4465e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169302
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user