Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20174685rwd; Wed, 28 Jun 2023 21:36:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ50yuliAzB1PeQiTSZ2lz0yJ0ayhazc8JeK0aQNE/dbwabDUHDe9ZvaxQX8nG7nuIk8Kzx+ X-Received: by 2002:a05:620a:27c4:b0:767:1613:cd2a with SMTP id i4-20020a05620a27c400b007671613cd2amr5937074qkp.15.1688013366913; Wed, 28 Jun 2023 21:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688013366; cv=none; d=google.com; s=arc-20160816; b=huTjDEKL+aWQqgo4SHPpeuwlL9clmLEdTIfJYAm86cvFU8ZEjvLj41LiuJCNg+5T8t 3z94b9xfwtV44bNv6r/TlbeIK0dT6Hf7en6cuZXbH6o+2tphaqy5A9upiL9YqYgpIv0v FZpl5hn3aVCS0hifZ+cvK8WRbdZdgErWPYTbmXnWE/eReytG0JliKc8dkryQOsK5nnjW UcX59P+UNcqa0kDJrKC4jIZL82S79ND75iPyZaoNCnhkNoBsseLCWZQ5KWCHPnHD8kDQ 6B4dFGfLv5YOruhcogJrZm4PfUDrpqU/503BvwPLQ6NBIj6Xks/ImKwHu3l9CKHOQ+Qu RVVg== 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=D7XOqTSDZOtUVd5gsMuzF7HGyo4cC6+cHT9OFJOUkek=; fh=JjZrE1DxSWEl6MlB8I5PyRGcl2MjUQe6GrfypBwEEmo=; b=y3tgU4ZgQspNhYyxrL+pNl06ndzjI+4tN2/VKZh2MpSJHXOdqil1xW6JL534fuXu3N TH/w682zXFiW+L1sGOW5pChzdTsIhqzSHTcL5D65PdZbbq7YhjWhBfLhcAgS44wmK8WB yGvpsNnAiIzfQPmvSJcr+xvgxHnhQ/pxmyewi7vnQCgt7GuTjcTIs8dGdG5rJ5PSqd9Q J0cnu4+DdX5O+TBG+g7LexLLkEgvr1JyAtPtMoiEeHgoEdVqJ9BiPR0udSGvIj4pl8Ac 0rTp7YH+h6pn2IXJ+9LimojVel/UDq5sOgdV22up89lLxYdRoIam3+trxn5I3dRoX6mA 0cjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=mPuqJl5Q; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rj6-20020a17090b3e8600b00263220254e2si3985055pjb.41.2023.06.28.21.35.52; Wed, 28 Jun 2023 21:36:06 -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=@gmail.com header.s=20221208 header.b=mPuqJl5Q; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231443AbjF2Eal (ORCPT + 99 others); Thu, 29 Jun 2023 00:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230456AbjF2Eaj (ORCPT ); Thu, 29 Jun 2023 00:30:39 -0400 Received: from mail-ot1-x32f.google.com (mail-ot1-x32f.google.com [IPv6:2607:f8b0:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED4CB1FD8; Wed, 28 Jun 2023 21:30:37 -0700 (PDT) Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-6b5cf23b9fcso264981a34.0; Wed, 28 Jun 2023 21:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688013037; x=1690605037; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=D7XOqTSDZOtUVd5gsMuzF7HGyo4cC6+cHT9OFJOUkek=; b=mPuqJl5Qb/XufWeJFmcc82iCmTfEfUXqgTlO+I+tFbil4MLw8WIT0DAg3ipgGM36xu +Ufy1MtGmeV2rvGlvLq7ZH7LLHD7gZ7GQ+b141UYLAk10WvUZi8VbJkT+nfaWbOPZw8d ms26XtBCIdrt21+MhxVVt6B9wWaN/4SK4eBiFbqvQo2wHViOb8uAr6z4qb+hw1Ksuo51 ROZehqJuk+VlQQZ4YOcR32yE3kOndsT7U9ypwwVVhbvqSSgkn7Mpb1ygFq/+Zo0ecYGQ /n6mdeXMQ2ObuBmwJnmEICN71lC6mibdUkI77rl859WED9f1D0cLIWfmx/LGj8jDfBrg 3Ppw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688013037; x=1690605037; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=D7XOqTSDZOtUVd5gsMuzF7HGyo4cC6+cHT9OFJOUkek=; b=OqlR496inOxTv+FIExP9tg3wAmxviBjo4krsFDINopUWHVQLXWczd8CLGUmptAWEtA ZMoKJiH+48AEr3/glJm3Df2WB47pENNjBE4tmn/3Hu1tV7yaAs6CRRq2n76p2LS/7qEQ qAA0Sdtg+YZhC5uM6U9H0AdS8/9x+dgW/a0QHd8rR8/ejRJdKkiFn0haJV5qAC9LOBYz 4YvHYr4ZRpXQ8hfvrW+nvg6rS+7S8QvBvdKnsL9NPF1eBB8iUHKlgp9CfNY4mWkeWHc0 fZTN2zML+WKcPM7HPeUbZtvMBr0lc7rBpJ+F/dZ6BqsV6WbmqXAl91VOfKhFizIuIZbI R1mQ== X-Gm-Message-State: AC+VfDzetBBcBFmrUKoQottyKOdf1mrssPR3acTfgckrhxvKbplKNL/A iovuwaJFT9g7TCUAbeqLlvQ2rnydq3nkW1/z X-Received: by 2002:a05:6871:3d1:b0:1b0:18e8:9536 with SMTP id a17-20020a05687103d100b001b018e89536mr13087156oag.52.1688013037125; Wed, 28 Jun 2023 21:30:37 -0700 (PDT) Received: from sumitra.com ([117.199.159.11]) by smtp.gmail.com with ESMTPSA id j22-20020a170902759600b001b3c892c367sm8345745pll.63.2023.06.28.21.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jun 2023 21:30:36 -0700 (PDT) Date: Wed, 28 Jun 2023 21:30:31 -0700 From: Sumitra Sharma To: Matthew Wilcox Cc: Hans de Goede , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Ira Weiny , Fabio , Deepak R Varma , Sumitra Sharma Subject: Re: [PATCH] fs/vboxsf: Replace kmap() with kmap_local_{page, folio}() Message-ID: <20230629043031.GA455425@sumitra.com> References: <20230627135115.GA452832@sumitra.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Tue, Jun 27, 2023 at 06:48:20PM +0100, Matthew Wilcox wrote: > On Tue, Jun 27, 2023 at 06:51:15AM -0700, Sumitra Sharma wrote: > > +++ b/fs/vboxsf/file.c > > @@ -234,7 +234,7 @@ static int vboxsf_read_folio(struct file *file, struct folio *folio) > > u8 *buf; > > int err; > > > > - buf = kmap(page); > > + buf = kmap_local_folio(folio, off); > > Did you test this? 'off' is the offset in the _file_. Whereas > kmap_local_folio() takes the offset within the _folio_. They have > different types (loff_t vs size_t) to warn you that they're different > things. > Hi Matthew, When creating this patch, I read and searched about the loff_t vs size_t. By mistake, I implemented it in the wrong way. Also, I did not test it and just compiled it. I apologise for doing so. And for the other points you have put as feedback. I will take some time to understand it. And would like to work on the changes you suggest. Thanks & regards Sumitra