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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56FE2C4707B for ; Sun, 14 Jan 2024 03:24:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3F8686B0080; Sat, 13 Jan 2024 22:23:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 380206B0081; Sat, 13 Jan 2024 22:23:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FA0D6B0082; Sat, 13 Jan 2024 22:23:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 0D2A46B0080 for ; Sat, 13 Jan 2024 22:23:59 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D0C6C1A013E for ; Sun, 14 Jan 2024 03:23:58 +0000 (UTC) X-FDA: 81676472556.27.581C584 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by imf13.hostedemail.com (Postfix) with ESMTP id 05E1E2000C for ; Sun, 14 Jan 2024 03:23:56 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=SWAaeHR2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf13.hostedemail.com: domain of smfrench@gmail.com designates 209.85.208.182 as permitted sender) smtp.mailfrom=smfrench@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1705202637; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gfta0bZFvjFZJvC0F4xMIC685zJ7SAda9ZzxTagHvw4=; b=LcOCWARByRRZF58O02CC/jucIYS8C5f9Tm6p3b5tgaqfBGi46Qo0sUpWCmtZXeJre2T4jC 5WrhLEMx2T2ShHo3hhd+JqJulaCVyoX2DlN+a2hxUAdZPAUiPZ+tCTvlWFpL0h6Q5Nv3Nq Imt7InCWQgnUQhOo59d8LL1nyUgVMRg= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=SWAaeHR2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf13.hostedemail.com: domain of smfrench@gmail.com designates 209.85.208.182 as permitted sender) smtp.mailfrom=smfrench@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1705202637; a=rsa-sha256; cv=none; b=NGOxevPqbMlrD0X3amKrTAkkRTnRHdPaNY1eyN7cyrUO4ASE5LQJKPLY8Ac6OcrEIyw5xY Kj8EgkT9ThISJYrSXwcrPz+kqu/hxIDk2i93WRklhS80PHFcQaNUzPOwzciPnSWceEC3uJ CXRsH9p9/eE9wPxH2GdYLcUYjExz6xU= Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2cd64022164so81160551fa.3 for ; Sat, 13 Jan 2024 19:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705202635; x=1705807435; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gfta0bZFvjFZJvC0F4xMIC685zJ7SAda9ZzxTagHvw4=; b=SWAaeHR2vHanX+rcgdhleZc+AMd2S4jTg9vV6EvXVrSxtovUmuCaF0eL50iJPWH18l fzeGlt+NDHjcD/A9tpniETkdgl+aGYeCZBaFTwfwlyY/vd3TSpPOViNXq1S7DY+H+jUR HWKwVcOZlaMWfjb5Jeujfci0pUx4ibHEMfIGHbDbY2JWKd64COEyvZXzawBhEEaPfla8 yE/FSrg8d0SMQ7BeFayQ+QX27civ5YbXGOAAUWwGQVa2kox+6JzFeAFjfeCuHQ1Xs2Y/ GoINUFOiM1TJ9nGXW5o9k9p9SqaJaBt7fi3r8ROEFIpeTREYqyANy8DM4tSAW3xfMu6S sciA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705202635; x=1705807435; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gfta0bZFvjFZJvC0F4xMIC685zJ7SAda9ZzxTagHvw4=; b=frUo45t+D+nzWhGUguryIh4LmPAPdv3wvEEnVSYCQf4ZlIRvKqrKemDWpIoH9dneLH 4wi1KMLqS8hAHaudOhe3uMaa0QbEU/qONaL5w0BP8DXXST1vA1EdKkGb2JZZBPFlew1d KW8o6jWFKnNKJtewIA8ihAiUzLTtVYE3BUu+CvE95XfovqgsHEAjEFIAbjX7NaC+3ohJ bVm6jt0ofIC24jACIvbKgvCGXvNajq7CSBRKRTPkRZpP5WiJtqoGOofWE12PJLWhUVUU t1HUHrT0QlAhv6SwMcZVkXx39hsUuF3wH5RF1WIlLO+tpxLysbDYzfehZ8b6x4OHXPJ0 rUBg== X-Gm-Message-State: AOJu0YxBSlxSZ9sDsfi7OfnnmamDpuWDQpzQyuvijfdRZfdDh9QpYPU4 AEK2/B8eKxr3fSzYTus9U4jTcjDLZJ5T0EDXNao= X-Google-Smtp-Source: AGHT+IHp2Jx9EpAWnyz05z7ZSv6ATR2OJO4m7nQlWoPvbzSMzQn2WZ/mqDTyJ/wGxu1LoMGKhW1HWVA6N84aJAq1mZQ= X-Received: by 2002:a2e:a409:0:b0:2cc:5e44:a8ee with SMTP id p9-20020a2ea409000000b002cc5e44a8eemr1815150ljn.105.1705202634498; Sat, 13 Jan 2024 19:23:54 -0800 (PST) MIME-Version: 1.0 References: <8e59220d-b0f3-4dae-afc3-36acfa6873e4@leemhuis.info> <13a70cc5-78fc-49a4-8d78-41e5479e3023@leemhuis.info> <2024011115-neatly-trout-5532@gregkh> <2162049.1705069551@warthog.procyon.org.uk> <2024011316-cathouse-relearn-df14@gregkh> In-Reply-To: <2024011316-cathouse-relearn-df14@gregkh> From: Steve French Date: Sat, 13 Jan 2024 21:23:43 -0600 Message-ID: Subject: Re: [Regression 6.1.y] From "cifs: Fix flushing, invalidation and file size with copy_file_range()" To: "gregkh@linuxfoundation.org" Cc: Salvatore Bonaccorso , David Howells , Paulo Alcantara , Shyam Prasad N , Rohith Surabattula , Matthew Wilcox , Jeff Layton , Steve French , "Jitindar Singh, Suraj" , "linux-mm@kvack.org" , "stable-commits@vger.kernel.org" , stable@vger.kernel.org, linux-cifs@vger.kernel.org, Linux regressions mailing list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 05E1E2000C X-Stat-Signature: dhyptt5dkji614xhdpu3xq1rrax96yhh X-Rspam-User: X-HE-Tag: 1705202636-179761 X-HE-Meta: U2FsdGVkX1+XgankWlCVCMRZ7Zwss7RQXyJJZ1nQt3boTZ6BQWjIgEDnp3EqZOa+9gejaXA0v4L3b3p8pf6uaNoq0+uF7APAPpL091qGJXj+kWt+vgqZ1HNkDLP3hLndUErHlyFX6vVQQC+0b06HFdjt5sIqwjZ7GkmifyGVMWzXvX+74v1xG38Nt7jVe4NxFatqI64IXrKlT2mS97VqYCuQnXtoFLBRIhgdYmY8du4/PTHpcmOw5r7L8cHk1CBNjuCb/O/XsEcKC3wFv9w4l79afkW8xtivam5D5KiS7GUaMJDiKVIFhOsYf9I+CYwhzHQw8kAhIsaXJ4cheCy5pov/Tad9X1mOE1EvrUAy9RuVfF6/0v/uVF/QQWkQrehZtyVQx54OTQb0MzTcEzXOwppfyCOH7tRHfwwPoo46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irNfGpqMkW/OAfw4gJRyt5BL0s1pnouzzSg+4MDRNK/UzMsUYv7fCbudfPGP699E+QCCa412bt87tK4Ph7/VdmZZtsvTVcskju/sK3M4G4jme2idBTySYDU0ulYCTzO49cAynYaqPw5T7yxNSDyv1jCNl2Jp94ivtS9NMT0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: tested out fine so far On Sat, Jan 13, 2024 at 3:41=E2=80=AFAM gregkh@linuxfoundation.org wrote: > > On Sat, Jan 13, 2024 at 10:31:46AM +0100, Salvatore Bonaccorso wrote: > > Hi, > > > > On Fri, Jan 12, 2024 at 11:20:53PM -0600, Steve French wrote: > > > Here is a patch similar to what David suggested. Seems > > > straightforward fix. See attached. > > > I did limited testing on it tonight with 6.1 (will do more tomorrow, > > > but feedback welcome) but it did fix the regression in xfstest > > > generic/001 mentioned in this thread. > > > > > > > > > > > > > > > On Fri, Jan 12, 2024 at 8:26=E2=80=AFAM David Howells wrote: > > > > > > > > gregkh@linuxfoundation.org wrote: > > > > > > > > > I guess I can just revert the single commit here? Can someone se= nd me > > > > > the revert that I need to do so as I get it right? > > > > > > > > In cifs_flush_folio() the error check for filemap_get_folio() just = needs > > > > changing to check !folio instead of IS_ERR(folio). > > > > > > > > David > > > > > > > > > > > > > > > > > -- > > > Thanks, > > > > > > Steve > > > > > From ba288a873fb8ac3d1bf5563366558a905620c071 Mon Sep 17 00:00:00 200= 1 > > > From: Steve French > > > Date: Fri, 12 Jan 2024 23:08:51 -0600 > > > Subject: [PATCH] cifs: fix flushing folio regression for 6.1 backport > > > > > > filemap_get_folio works differenty in 6.1 vs. later kernels > > > (returning NULL in 6.1 instead of an error). Add > > > this minor correction which addresses the regression in the patch: > > > cifs: Fix flushing, invalidation and file size with copy_file_range= () > > > > > > Suggested-by: David Howells > > > Reported-by: Salvatore Bonaccorso > > > Signed-off-by: Steve French > > > --- > > > fs/smb/client/cifsfs.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c > > > index 2e15b182e59f..ac0b7f229a23 100644 > > > --- a/fs/smb/client/cifsfs.c > > > +++ b/fs/smb/client/cifsfs.c > > > @@ -1240,7 +1240,7 @@ static int cifs_flush_folio(struct inode *inode= , loff_t pos, loff_t *_fstart, lo > > > int rc =3D 0; > > > > > > folio =3D filemap_get_folio(inode->i_mapping, index); > > > - if (IS_ERR(folio)) > > > + if ((!folio) || (IS_ERR(folio))) > > > return 0; > > > > > > size =3D folio_size(folio); > > > > I was able to test the patch with the case from the Debian bugreport > > and seems to resolve the issue. Even if late, as Greg just queued up > > already: > > > > Tested-by: Salvatore Bonaccorso > > Thanks, I've added your tested-by to the patch now. > > greg k-h --=20 Thanks, Steve