mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-07 13:14:51 +00:00
fix a zfs cross-device rename crash introduced in r303763
The problem was that 'zfsvfs' variable was not initialized if the error was detected, but in the exit path the variable was dereferenced before the error code was checked. Reported by: np MFC after: 3 days X-MFC with: r303763
This commit is contained in:
parent
b5070c1829
commit
96762fe314
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303869
@ -3956,7 +3956,7 @@ zfs_rename(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp,
|
||||
VOP_UNLOCK(sdvp, 0);
|
||||
|
||||
out: /* original two vnodes are locked */
|
||||
if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS && error == 0)
|
||||
if (error == 0 && zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
|
||||
zil_commit(zilog, 0);
|
||||
|
||||
if (*tvpp != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user