Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2602172rdg; Mon, 14 Aug 2023 07:42:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNkuFpedd1B8owlKae4V9Ns3rQNDfiFXIsQYsZZjjY7jG7E450+3oWNywKrqi6DKYN9gOG X-Received: by 2002:a05:6a20:3ca8:b0:137:a3c9:aa99 with SMTP id b40-20020a056a203ca800b00137a3c9aa99mr10854620pzj.30.1692024171103; Mon, 14 Aug 2023 07:42:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692024171; cv=none; d=google.com; s=arc-20160816; b=0QrwupikPUtEkVnTVms50PMK0K8L0D9NkgfzIQF96x8EMuVfg5Q2pgSrR+KRLIHnGT ZBsp+dNz2iYjxhUaVmYCkHqh7Yt22acpuK1d1LC9zGSLXujcTO/gl0cdS7mS772/vOnW bELMNHoCtlJfZ7P8FG7VTingaBbdG+gHvVuqnzIXuqcixmMNNBp3XzlWnRzKOwRRVqqH CgosjwfC5C0uFRl45Ntc8H+sLhg1qIo+lImgzg5JJfaxHFFhYQmAFbL7a62s3H6X4UU8 Ogoc860sioX6puGcDH5xmBecL85GoqyGCd6jRstZZPFFyP/3VQptQBpmQnD/W6QVGd0y T11g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=T8Pbi+AtdsCBMxSWZKRpPW1Wq89VMiXjiZzvJl2OWrg=; fh=0KCycHaCMbuTkasvNaX1OKQ7J/V2/kajWoVf5ff1PBM=; b=aGMPBikWKhzVUCc/X6+M3AfXqlvBCyoMCY8QefXadi59UTGKln0yyOEidKfERPcIGW 6GrqoCdyOC0sRicJoMQlsYkGPgN4hg8hFlrBWFxuJ1ofozTFoPd9qcFtUnnE2CuHUQZ9 i6jj1YJrzYhSnFS72xMv3O9muMy1rFheEX7slZlFXiQrVw+pvsTru1utxbmxqnOw2mf0 VzQPKaMrhW1Wcc+Ox3Qmq1PQMwsHepcf2Y8ilmvk0Jb0N36vvK9zroPJprY9OdTe7ueH drX3aiVSh/x5Wx7+gyktDON62S5QsYiRSjgXDB0+rqsdLa9AuWdq2pIGFUVtmLDsSpfz uPUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZAzrCQUw; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bw21-20020a056a00409500b00680098cc5f8si8007901pfb.84.2023.08.14.07.42.39; Mon, 14 Aug 2023 07:42:51 -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=@infradead.org header.s=casper.20170209 header.b=ZAzrCQUw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231280AbjHNNYH (ORCPT + 99 others); Mon, 14 Aug 2023 09:24:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230498AbjHNNXk (ORCPT ); Mon, 14 Aug 2023 09:23:40 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AA6212D; Mon, 14 Aug 2023 06:23:39 -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=T8Pbi+AtdsCBMxSWZKRpPW1Wq89VMiXjiZzvJl2OWrg=; b=ZAzrCQUwDaAiLY4rZgSiHtfOqx IW4PK1p+wQl0ChvH7y0wpWHWR1LYToASBwSu0e0rdS9Xca7PHdv361bc0zWtqxALBw2YbZE8gTIzw 13sjIAlCgdMAwDNFKrSkxr9EgUQKWPHkeNvYBf8QbDUyMjHiTJLz1zL0NHqF32I0riLKJ51lf4FaP WXfc4pqsB+rzHH9681o5Kp/D8rqmKoSAfEFvs97UULXP66FtphZ0I3Hq6RhsECX25jD1y3TKWr1aY lyGixDvt6jM913leiyLRLYy667PvsQDGi2bPZnuVG0g3Qk20/qMhJAdDhUc5bligeE0bPItFzdYq3 NbVRDT0g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qVXXc-002BRU-Pq; Mon, 14 Aug 2023 13:23:28 +0000 Date: Mon, 14 Aug 2023 14:23:28 +0100 From: Matthew Wilcox To: David Howells Cc: Alexander Viro , Jens Axboe , Christoph Hellwig , Christian Brauner , Linus Torvalds , jlayton@kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] iov_iter: Convert iterate*() to inline funcs Message-ID: References: <3710261.1691764329@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3710261.1691764329@warthog.procyon.org.uk> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE 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 On Fri, Aug 11, 2023 at 03:32:09PM +0100, David Howells wrote: > @@ -578,10 +683,11 @@ size_t copy_page_from_iter_atomic(struct page *page, unsigned offset, size_t byt > kunmap_atomic(kaddr); > return 0; > } > - iterate_and_advance(i, bytes, base, len, off, > - copyin(p + off, base, len), > - memcpy_from_iter(i, p + off, base, len) > - ) > + > + bytes = iterate_and_advance(i, bytes, p, > + copy_from_user_iter, > + iov_iter_is_copy_mc(i) ? > + memcpy_from_iter_mc : memcpy_from_iter); > kunmap_atomic(kaddr); > return bytes; > } Please work against linux-next; this function is completely rewritten there.