mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Don't call zfs_exit_two() before zfs_enter_two().
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net> Closes #14825
This commit is contained in:
parent
d0d91f185e
commit
b6d7370b9d
@ -1072,6 +1072,15 @@ zfs_clone_range(znode_t *inzp, uint64_t *inoffp, znode_t *outzp,
|
|||||||
|
|
||||||
inzfsvfs = ZTOZSB(inzp);
|
inzfsvfs = ZTOZSB(inzp);
|
||||||
outzfsvfs = ZTOZSB(outzp);
|
outzfsvfs = ZTOZSB(outzp);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We need to call zfs_enter() potentially on two different datasets,
|
||||||
|
* so we need a dedicated function for that.
|
||||||
|
*/
|
||||||
|
error = zfs_enter_two(inzfsvfs, outzfsvfs, FTAG);
|
||||||
|
if (error != 0)
|
||||||
|
return (error);
|
||||||
|
|
||||||
inos = inzfsvfs->z_os;
|
inos = inzfsvfs->z_os;
|
||||||
outos = outzfsvfs->z_os;
|
outos = outzfsvfs->z_os;
|
||||||
|
|
||||||
@ -1083,14 +1092,6 @@ zfs_clone_range(znode_t *inzp, uint64_t *inoffp, znode_t *outzp,
|
|||||||
return (SET_ERROR(EXDEV));
|
return (SET_ERROR(EXDEV));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* We need to call zfs_enter() potentially on two different datasets,
|
|
||||||
* so we need a dedicated function for that.
|
|
||||||
*/
|
|
||||||
error = zfs_enter_two(inzfsvfs, outzfsvfs, FTAG);
|
|
||||||
if (error != 0)
|
|
||||||
return (error);
|
|
||||||
|
|
||||||
ASSERT(!outzfsvfs->z_replay);
|
ASSERT(!outzfsvfs->z_replay);
|
||||||
|
|
||||||
error = zfs_verify_zp(inzp);
|
error = zfs_verify_zp(inzp);
|
||||||
|
Loading…
Reference in New Issue
Block a user