Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp883980iog; Fri, 24 Jun 2022 17:04:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tM2k60Q5iuWnSl0EmH4T39Hb9hmzxxY7VlKpCaICNhc67GWyLizCE34whBGzxeH02qzbhC X-Received: by 2002:a17:906:779a:b0:712:3bae:5d75 with SMTP id s26-20020a170906779a00b007123bae5d75mr1434325ejm.571.1656115480244; Fri, 24 Jun 2022 17:04:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656115480; cv=none; d=google.com; s=arc-20160816; b=rSFUDwn5Ch7i0Dh9Ia5nwl9bma2JJUUNMR+q5O2nGgEx2zxbdiZwk4PgUNdRCFIZGF LSmTDuLopaLBDVxvRKNY3+w3hty+OejuR6kvfmzm4Z/ZCb+I0MOnM4wy/+RV85eXJh6N qdgcXfQC+Jb9MrEuWIpE+ikGRmdqQ5Kads1vubUA3276KNOwH/W+2VNHkck7U+aldwo0 DOJBYJDjYNWnPafCvJ+CxCSzBs1r4a7oayBm0L8rSb/vYBG+pjpnXnvDwxF4oPSaa2J/ MNJPtP8msDIdDJ2ecpiIvpcTn+kE8RSNKSzynxFvYioVDdVioxYHfc67pLf26j2owRqe YBrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=aobWKircXEKbGTkT46vsoN1mG2oAxEWPsS6CajoA/6U=; b=M4vzrY7ZXkzr1+LC8PIGVREDM6G6As1DJ1vm9KXWzpIqpJ70HxkIkhKBGiz8cJbC2b 36riPVD6HqPHe5afiHWlM7d7bLQA89nyren0PXrLejN0mlZGF7Fm4h1QT4S0urfLkBRV 1Jv+kUac3WQ1KMKG/HV9vZFSALzvCBnsH4/W9n2j2jgiLYH30fimDctqQFlFCrMz+bbi sZygA0rjD5zNFX9yzXIdXByMMbkcrBkCI8ovrlN6kE7jGF2n3377hLIzidj6KDUq6dJ1 lYYbHhDvGwsGvmccE/qRjWurS4/KRhkQn7IibGBxvuPfmxFOG7ufN60EBG2CM4Cprrff +Bbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=uoAaIrou; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5-20020a50fd85000000b004356b3746d1si1833102edt.71.2022.06.24.17.04.16; Fri, 24 Jun 2022 17:04:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=uoAaIrou; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231672AbiFXXr2 (ORCPT + 99 others); Fri, 24 Jun 2022 19:47:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231190AbiFXXr1 (ORCPT ); Fri, 24 Jun 2022 19:47:27 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E03A38BEC4; Fri, 24 Jun 2022 16:47:26 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 70CD71F891; Fri, 24 Jun 2022 23:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1656114445; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aobWKircXEKbGTkT46vsoN1mG2oAxEWPsS6CajoA/6U=; b=uoAaIrouqAUg4vn7RsvgiNCjACanuj9PzdM5fzvNQcyYQ5WhnxPSzG9ByaKlAXiBqmQkwx 8qn89Q9/xpl/cQmHs0Rw9pHZ1yP8J0RXVfZlqJlenR1qjqOD4WTtP6HcEsqzhBGVp+UBvJ mDJwXEj0PoIDF9jnXRVQ6XzorSdnXhc= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 38B7113ACA; Fri, 24 Jun 2022 23:47:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id n38fDA1NtmLyUgAAMHmgww (envelope-from ); Fri, 24 Jun 2022 23:47:25 +0000 Message-ID: Subject: Re: [PATCH] lib/sbitmap: Fix invalid loop in __sbitmap_queue_get_batch() From: Martin Wilck To: wuchi , axboe@kernel.dk, andriy.shevchenko@linux.intel.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 25 Jun 2022 01:47:24 +0200 In-Reply-To: <20220605145835.26916-1-wuchi.zero@gmail.com> References: <20220605145835.26916-1-wuchi.zero@gmail.com> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: base64 User-Agent: Evolution 3.44.2 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gU3VuLCAyMDIyLTA2LTA1IGF0IDIyOjU4ICswODAwLCB3dWNoaSB3cm90ZToKPiAxLiBHZXR0 aW5nIG5leHQgaW5kZXggYmVmb3JlIGNvbnRpbnVlIGJyYW5jaC4KPiAyLiBDaGVja2luZyBmcmVl IGJpdHMgd2hlbiBzZXR0aW5nIHRoZSB0YXJnZXQgYml0cy4gT3RoZXJ3aXNlLAo+IGl0IG1heSBy ZXVzZSB0aGUgYnVzeWluZyBiaXRzLgo+IAo+IFNpZ25lZC1vZmYtYnk6IHd1Y2hpIDx3dWNoaS56 ZXJvQGdtYWlsLmNvbT4KClJldmlld2VkLWJ5OiBNYXJ0aW4gV2lsY2sgPG13aWxja0BzdXNlLmNv bT4KCj4gLS0tCj4goGxpYi9zYml0bWFwLmMgfCA1ICsrKystCj4goDEgZmlsZSBjaGFuZ2VkLCA0 IGluc2VydGlvbnMoKyksIDEgZGVsZXRpb24oLSkKPiAKPiBkaWZmIC0tZ2l0IGEvbGliL3NiaXRt YXAuYyBiL2xpYi9zYml0bWFwLmMKPiBpbmRleCBhZTRmZDRkZTllYmUuLjI5ZWIwNDg0MjE1YSAx MDA2NDQKPiAtLS0gYS9saWIvc2JpdG1hcC5jCj4gKysrIGIvbGliL3NiaXRtYXAuYwo+IEBAIC01 MjgsNyArNTI4LDcgQEAgdW5zaWduZWQgbG9uZyBfX3NiaXRtYXBfcXVldWVf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