mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux: Fix ZFS_ENTER/ZFS_EXIT/ZFS_VERFY_ZP usage
The ZFS_ENTER/ZFS_EXIT/ZFS_VERFY_ZP macros should not be used in the Linux zpl_*.c source files. They return a positive error value which is correct for the common code, but not for the Linux specific kernel code which expects a negative return value. The ZPL_ENTER/ZPL_EXIT/ZPL_VERFY_ZP macros should be used instead. Furthermore, the ZPL_EXIT macro has been updated to not call the zfs_exit_fs() function. This prevents a possible deadlock which can occur when a snapshot is automatically unmounted because the zpl_show_devname() must never wait on in progress automatic snapshot unmounts. Reviewed-by: Adam Moss <c@yotes.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #11169 Closes #11201
This commit is contained in:
@@ -90,7 +90,11 @@ do { \
|
||||
zfs_exit_fs(zfsvfs); \
|
||||
rrm_exit(&(zfsvfs)->z_teardown_lock, FTAG); \
|
||||
} while (0)
|
||||
#define ZPL_EXIT(zfsvfs) ZFS_EXIT(zfsvfs)
|
||||
|
||||
#define ZPL_EXIT(zfsvfs) \
|
||||
do { \
|
||||
rrm_exit(&(zfsvfs)->z_teardown_lock, FTAG); \
|
||||
} while (0)
|
||||
|
||||
/* Verifies the znode is valid. */
|
||||
#define ZFS_VERIFY_ZP_ERROR(zp, error) \
|
||||
|
||||
Reference in New Issue
Block a user