Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deadlock between zfs umount & snapentry_expire
zfs umount -> zfsctl_destroy() takes zfs_snapshot_lock WRITER & calls zfsctl_snapshot_unmount_cancel() which waits for snapentry_expire() if present(only when snap is automounted). This snapentry_expire() itself then waits for zfs_snapshot_lock READER, resulting in a deadlock. Fix is to take READER in zfsctl_destroy() & upgrade to WRITER after call to zfsctl_snapshot_unmount_cancel() before calling zfsctl_snapshot_remove(). This allows snapentry_expire() to progress too with the READER. Signed-off-by: Rohan Puri <rohan.puri15@gmail.com>
- Loading branch information