Date: Tue, 19 Feb 2019 23:53:33 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344320 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201902192353.x1JNrX3a090829@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Tue Feb 19 23:53:33 2019 New Revision: 344320 URL: https://svnweb.freebsd.org/changeset/base/344320 Log: Simplify the code. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Tue Feb 19 23:44:00 2019 (r344319) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Tue Feb 19 23:53:33 2019 (r344320) @@ -360,16 +360,13 @@ trim_map_write_start(zio_t *zio) return (B_FALSE); } - ts = avl_find(&tm->tm_queued_frees, &tsearch, NULL); - if (ts != NULL) { - /* - * Loop until all overlapping segments are removed. - */ - do { - trim_map_segment_remove(tm, ts, start, end); - ts = avl_find(&tm->tm_queued_frees, &tsearch, NULL); - } while (ts != NULL); + /* + * Loop until all overlapping segments are removed. + */ + while ((ts = avl_find(&tm->tm_queued_frees, &tsearch, NULL)) != NULL) { + trim_map_segment_remove(tm, ts, start, end); } + avl_add(&tm->tm_inflight_writes, zio); mutex_exit(&tm->tm_lock);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902192353.x1JNrX3a090829>