mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-01-15 01:32:04 +03:00
We have infinite loop and on certain condition, we exit this loop and thread with pthread_exit(). But also after this loop, we have a code to perform pthread_cleanup_pop() and return from the thread. The problem is that modern compilers are able to recognize that we actually never get to the statements after loop and therefore it is dead code there. I think, instead of pthread_exit(), it is better to break out of loop and let the last statements to work as intended. This is because we do need to keep pthread_cleanup_pop() anyhow. Of course, it is matter of taste if we want to use return or pthread_exit as very last statement in this function. Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Signed-off-by: Toomas Soome <tsoome@me.com> Closes #17900 |
||
|---|---|---|
| .. | ||
| os | ||
| .gitignore | ||
| libzfs_changelist.c | ||
| libzfs_config.c | ||
| libzfs_crypto.c | ||
| libzfs_dataset.c | ||
| libzfs_diff.c | ||
| libzfs_impl.h | ||
| libzfs_import.c | ||
| libzfs_iter.c | ||
| libzfs_mount.c | ||
| libzfs_pool.c | ||
| libzfs_sendrecv.c | ||
| libzfs_status.c | ||
| libzfs_util.c | ||
| libzfs.abi | ||
| libzfs.pc.in | ||
| libzfs.suppr | ||
| Makefile.am | ||
| THIRDPARTYLICENSE.openssl | ||
| THIRDPARTYLICENSE.openssl.descrip | ||