From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FA6A42981C for ; Mon, 20 Jul 2026 15:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784559824; cv=none; b=dyRgrqc5FGXvHV3Wr8kCQO9/gkSmpf8Fdb1MjzQK29HQq4PjxuI5ujXfuMoXWr62TTb7gvbhpXMInMD+IbeNaVnp+5iGvQiMDAID+wy2vGEzindZmMZnt0iDpirqx4DzprHB5sMwi5bwe4YEN25vksLsqLjd2FZOAnuunCKieDc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784559824; c=relaxed/simple; bh=kHyVi1X3653L6/E5eJCh0+Evt8DBGh0gAuSqsbK/2lM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EtICNczwrTCA/mggqya0PXnDFzxiMOBA2SidAY1mB3DaOlko3YsZst9aLmZurnTgh4VrP1ndrJzNK+cj1ky/GkGsir/R8RYz0AU//tVSdFst6gvUFfnl4yOtuco16lDYCAvgroYrtHpi+zj1i9fq1LXVH+ppUQf6IjA9dEKPj8k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=vBkAKj9u; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vBkAKj9u" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2ccdf36f63dso369055ad.0 for ; Mon, 20 Jul 2026 08:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784559823; x=1785164623; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=CoUBDaPFGXQM1OhLmt0HKzfSrSapevvomHz56sEIB6c=; b=vBkAKj9uc97Me0T5IuGYQLGDvd6DAhvyfWojJI0ER2sJ9ut7nI2wWOrc+ryURpszos zaGod0RXx18PIDyS27B6z9OdW4x4EoQldGVwcSxFPpgWWuWg3dEmvdgB3Ki9iw6Nc4t8 6z9gDCUpinNU/Kcl2h3gvqY9xzvRIsHHtAxuWI6BCJejnHL3KdU1qpXp3h2huju4y+/T Z8ikJDz+0k3Vmhy1txNoMcXnhNm0JvQQaTyAxDUmYePxNuPkW1csm1pN15FtFD4PxIyv v+AmB+fnOG9Dtn9LtxMwgqy0kiMEUsz8lYFZ9GgIUa8JNFMfWAJS+o+DRNU20mKUswDd 05jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784559823; x=1785164623; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=CoUBDaPFGXQM1OhLmt0HKzfSrSapevvomHz56sEIB6c=; b=Jg422JR7g3+WI8G3DwO7pomOxbAJtcIZymG2X2ihtxBKfT1b+ZxENxCNSlVHux83GW fWdUzhVCkyrkBwn+RYTZMe4fvBhJmewt8F1JsL/2QLetHLTI6QDWS3T2k1e0RO7poK1f adPwMW42utyLewfxW9c+FMkF+8izL05lV5BUqicP9JAzItrLO3Wd84jnOaw9CH8F6qSX pq7h6wzFa1JCVNqzbpB3KCxqHXpwwY+I2MDzaqc3XC+bM31ZIyKrZLgGVZG+iZciGFt0 mXP+18tkYO4OtEtuwMX1UJPd/vkq+JXk5EWNuDpAEsecFyFGGbsvU5qDvOaK1giBR79G K1dg== X-Forwarded-Encrypted: i=1; AHgh+RoXvlVeJhlyiRHsYfEYWSg2KL+Scu5cwEwGanT5akyIS2/ONZyToZYoD48Cj4nZWf1PT17on4U7KlRS3ts=@vger.kernel.org X-Gm-Message-State: AOJu0YwI+LgO/zSSjmU44OWPKoFvKkKnmmr1CaQWcN/HjJsxjlDap/0k nNxpOa2wAKqfxek741FyJ6dzlq5yG7xqfhDi7Xe66Mxb2kNNYqvkSVDKaecxu6YjZQ== X-Gm-Gg: AR+sD12gAMPNIpgJy0uOPsjh0I6Eb7vAaOJGQUQouzADqUFxHATHThB84/6nYpb+ZxB xgBPsIGVF3gr7vd5QLaxP1wu5XsL1JC/UUpEx9EANYP0+DmJrJrjKDqlJ+kgfV+fXiDrSj1W+ia 2Gt7bgAkTj/ZRRCcYgZlHjK6/Q3UV+1aedTc7fdQjOdFUpDs5Tf6f2Ai2nH5oSGH5uctgnlFvNu Ih0xmcsUo2wLBGGAjMSEEP5lB7eNrFkqIFo/D1tWFZb82viC+eml/7daswnnYHkzG1zKMkVXRGj 9Uc6jHTKd/YeHuum+aaCUEeuFL8bmyNoplRo32Z7aMyjgIX21CIXp6Xhv6I/MGqU2EnUhEG7+u2 2hu6ciK61PUgDdg/AxjTk1Jsu4ApzEk3afp8da8ERhDG6cF8jOTbmG1CKacHe8Jc9XZtPSQg9J/ uMf1/CQx2ITm9zQB2XQP40qO/2xGjOT6Sc3f+3 X-Received: by 2002:a17:903:41ce:b0:2b7:b03d:9dce with SMTP id d9443c01a7336-2cf7b68e33amr1005485ad.18.1784559822071; Mon, 20 Jul 2026 08:03:42 -0700 (PDT) Received: from google.com (10.129.124.34.bc.googleusercontent.com. [34.124.129.10]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84c2adfdfd0sm5823209b3a.25.2026.07.20.08.03.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 08:03:41 -0700 (PDT) Date: Mon, 20 Jul 2026 15:03:35 +0000 From: Pranjal Shrivastava To: Shivaji Kant Cc: Christoph Hellwig , Trond Myklebust , Anna Schumaker , linux-nfs@vger.kernel.org, Chuck Lever , Jeff Layton , linux-kernel@vger.kernel.org, Logan Gunthorpe , Jason Gunthorpe , linux-pci@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [PATCH v3 3/5] nfs: Introduce nfs_release_request_list helper Message-ID: References: <20260715143540.3597616-1-praan@google.com> <20260715143540.3597616-4-praan@google.com> <20260720091505.GC24298@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Jul 20, 2026 at 03:28:09PM +0530, Shivaji Kant wrote: > On Mon, Jul 20, 2026 at 2:45 PM Christoph Hellwig wrote: > > > > On Wed, Jul 15, 2026 at 02:35:38PM +0000, Pranjal Shrivastava wrote: > > > Introduce a centralized helper, nfs_release_request_list, to handle > > > the bulk release of nfs_page requests from a list. > > > > > > This serves as a preparatory step for two upcoming improvements: > > > > > > 1. Pin-Aware Cleanup: As we migrate to iov_iter_extract_* API, > > > requests will hold pins (GUP) instead of standard references. The > > > helper ensures that the correct unpinning logic gets applied > > > consistently across all requests in a list. > > > > > > 2. Folio Support: In subsequent patches where nfs_page structures > > > will cover multi-page folios, this helper provides a clean > > > infrastructure to unlock these larger units of I/O in bulk during > > > completion, similat to the pattern in bio_release_pages. > > nit: similar -> similar > Ack. Fixing it, > > > +/* > > > + * nfs_release_request_list - Release a list of NFS read/write requests > > > + * @head: list of requests to release > > > + * > > > + * Removes each request from the list and drops it's refcount. > > > + */ > > > +void nfs_release_request_list(struct list_head *head) > > > +{ > > > + struct nfs_page *req; > > > + > > > + while (!list_empty(head)) { > > > + req = nfs_list_entry(head->next); > > > > req could/should be local here. Or you switch to list_first_or_null, > > which some folks prefer. > > > > > +extern void nfs_release_request(struct nfs_page *req); > > > +extern void nfs_release_request_list(struct list_head *head); > > > > Please drop the superflous externs for new code. > > > > Small nit + fix christoph's comment, > else looks ok > > Reviewed-by: Shivaji Kant Thanks, Praan