From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18B17C11F68 for ; Wed, 30 Jun 2021 07:17:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC38D61CC0 for ; Wed, 30 Jun 2021 07:17:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232861AbhF3HUL (ORCPT ); Wed, 30 Jun 2021 03:20:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232705AbhF3HUK (ORCPT ); Wed, 30 Jun 2021 03:20:10 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDECFC061766; Wed, 30 Jun 2021 00:17:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=AmLWm8f1+xjYGNy9dtQzaNaqp/ZZfO73MYaUMsPh1Dg=; b=F8b+pRoMBgZQhdcjcephjDNsSI VA/3Xojz0o/TRMdjW+z7a/VKUfEThgnYdDQaUcXc4PejZicM3AxahMUxxLqkGboHXMP29hAd5ThOl Ut2N2h7kiLB3fYN9IkffojJT7nZ3varaq5I4oZyrJPNNx7pC7QEtI75+5oVoOgwTEjajRzSeKXdgZ ZeJB4jzuhqkMY/QmAvbpQR78Q60mh0OKr3Mm3QpU2Sj3nL/cJtuPLXgSvGhtFoQ4sgl0p94E3w6IS pBQfqFXCTEtDx91plZxAtTNyTIqBMPHiPdiWcMQhZFYvkmgv4XIBEGO6shDHjz2vX+YtN5EX5o59f HDi2xZWQ==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lyUSb-0051uJ-FJ; Wed, 30 Jun 2021 07:16:48 +0000 Date: Wed, 30 Jun 2021 08:16:37 +0100 From: Christoph Hellwig To: Leon Romanovsky Cc: Christoph Hellwig , Doug Ledford , Jason Gunthorpe , Maor Gottlieb , Dennis Dalessandro , linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Mike Marciniszyn , Yishai Hadas , Zhu Yanjun Subject: Re: [PATCH rdma-next v1 1/2] lib/scatterlist: Fix wrong update of orig_nents Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 30, 2021 at 10:02:11AM +0300, Leon Romanovsky wrote: > Another possible solution is to change __sg_alloc_table()/__sg_alloc_table_from_pages > to return total_nents and expect from the users to store it internally and pass > it later to the __sg_free_table(). > > Something like that. Yes, that sounds pretty reasonable.