Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp697759lqp; Thu, 21 Mar 2024 12:42:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWMGyYOtY5W+mJvdT7swoY1U0sPKl19oRz9WlSt78BV82OmMd632zpaeTPbfMy5d2SiJoH9LrGI5Kce8AXHAxXC6vLXLzF3Vq5uBIghcw== X-Google-Smtp-Source: AGHT+IGcFqycjMMCXN5C7D0k2NE8Ifz2bqvfEL/cl0E3/9Oe4exqGZhS6Rfpdg9j5DpZdqXoYjT/ X-Received: by 2002:a05:6a21:1786:b0:1a3:6dab:b2c3 with SMTP id nx6-20020a056a21178600b001a36dabb2c3mr5070210pzb.30.1711050179213; Thu, 21 Mar 2024 12:42:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711050179; cv=pass; d=google.com; s=arc-20160816; b=kkhTikm9YimfCWtVkkfNdcGv8C3WyV6PfmHGDBIEA/1fGiZkYB1mhO2hBHrXnCWwVJ RcdFBg8TbQDtbf/UglqrNURSuyjaKLzSOkQhKk3iblIyxuC8PgsQdGFLdRORHYb0Bzle NRwoweeCP8qYx3e5y1aJDif9ROiTsyxzYTmXADA3B/+DubbO40k8uIS+xW0Pl4V/OgFd GrzHXTM5mP3F0/K41MCcxMWW2be9ODGx87CoBlLFxgC+eGlSzIuHue/I7zwNDcQgy7uF sD/4hIwY1PF8IFJYKAIOSaf6COaD9T76sA9Wdk+8VftrDd/okmTp02//t+pyQa7ZGnto iEwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=w+60oXtOYQe8xUgVPdhKzujQQbWCeTry0UWI16et6do=; fh=KEoESMf3gBBJDh3l8w4TCVzkgTkm+1kinEL3jtnleSo=; b=M9CbNQTkWFubyVKVdHXMdrk1b7HYS0sO3Tf0dpCEFl3bOxZlRiIi+GyCH8pocgstwk 0ehCYCNHIcdy6WyrJT9BpIr0Rs7OrZ1+if6hhpzEsl54oJRLU8Y72bZ6Rt4r20M45o8R RQJRgcbXqHImRir9+uoWRtHTLfclNdFnJoKLhHfBDzxiAzDVVHmRSTkFp1WDRmCHPjQ1 8Ht2bsP0bKU8k5iwFkAmG3o3+F0G7rQJle8V7JWfd98iEd3JZCrPvTYPNPg2h/K+cf/y NsbP0591IN/qYlET/M3qfiBzao0QHTYFBhehxRst5zvG4QjQLAoYwkS8TcnF9oEL1dEt Zd3A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XCC37G0t; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-110027-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110027-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a28-20020a63705c000000b005e83f5a6d09si395101pgn.743.2024.03.21.12.42.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 12:42:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-110027-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XCC37G0t; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-110027-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-110027-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0566F2834CC for ; Thu, 21 Mar 2024 12:24:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8227762E3; Thu, 21 Mar 2024 12:23:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="XCC37G0t" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84D8676036; Thu, 21 Mar 2024 12:23:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711023833; cv=none; b=L5XnVIfUO+AaJjqjo8cZFD+gkaT7B6IjoQV/Qdg+HfcWGWA5hlm61EIREpZDx8gYMBnrtu2HySfuAiDrkZ6VW62Nqq19yjNvSEcy+RKP5kX+QK2+lQ/RdwkGzAV/stCUlG1NmqBrZ2zT75fSkLb/Am9Ujzi4eUYN8j4IOl8x6u0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711023833; c=relaxed/simple; bh=xiasNIBZOqw1cYdYjNN5AKStifHdqUgg5zBqP7kv5S4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Myxj8rV7G95gvhog35nfkgKA52E3tvhCcu3pc8JlkFZjV3uuzDG8EPeqBi0jcwopNigeFCY7NoAL8lDCptjkP2T6BHp0eUy8hyhvmwxKNd4aDKZUAG+aAvByuKQa9y4fOzKG6alOa+h/MZQGYlFTfFN5DE1fwr6g1PGZ1rJ4h/Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=XCC37G0t; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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=w+60oXtOYQe8xUgVPdhKzujQQbWCeTry0UWI16et6do=; b=XCC37G0t/VDxrWlnbkb64x5eut GTJs+sIWygUT16RO47628u8rSc+FX0nX4Pzdg4bfIrnjaXxmT/P0XoO4W7qa5JDbrZI7OwxXJEkLf OhUDw6JqyiQPiB83pOI4sSqGvmLY9zOCTeUCW0rgXtSXc7Cg9UsyaDHTcSeZoAyGHtmk67bPq+vDD foCufIRJsGFyCnsxtuAARNaWaySvJkcwsZry6pEdBBlvkbx5DMD+7KBc+NH8xeYoJJzC7qDxLph7T MN6lKtKSszy70WetzejQOUfzYrgWTT+GXeaZhNW4m2XSL6vIjGs8ABQCN5C6jCS9A1S3kjdnczIG5 oOIbRA0Q==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnHSP-00000006hw8-0ZZw; Thu, 21 Mar 2024 12:23:41 +0000 Date: Thu, 21 Mar 2024 12:23:41 +0000 From: Matthew Wilcox To: Kefeng Wang Cc: Alexander Viro , Benjamin LaHaise , Christian Brauner , Jan Kara , linux-kernel@vger.kernel.org, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 1/3] fs: aio: use a folio in aio_setup_ring() Message-ID: References: <20240321082733.614329-1-wangkefeng.wang@huawei.com> <20240321082733.614329-2-wangkefeng.wang@huawei.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240321082733.614329-2-wangkefeng.wang@huawei.com> On Thu, Mar 21, 2024 at 04:27:31PM +0800, Kefeng Wang wrote: > + pr_debug("pid(%d) [%d] folio->count=%d\n", current->pid, i, > + folio_ref_count(folio)); > + folio_mark_uptodate(folio); > + folio_unlock(folio); You can use folio_end_read() here.