{"id":2225010,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2225010/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260420083705.1009074-9-dhowells@redhat.com/","project":{"id":12,"url":"http://patchwork.ozlabs.org/api/1.1/projects/12/?format=json","name":"Linux CIFS Client","link_name":"linux-cifs-client","list_id":"linux-cifs.vger.kernel.org","list_email":"linux-cifs@vger.kernel.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260420083705.1009074-9-dhowells@redhat.com>","date":"2026-04-20T08:36:59","name":"[08/11] netfs: Fix group handling in netfs_read_gaps()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"13c42781b38ba7cb4c085f69002d7241a53ecc96","submitter":{"id":59,"url":"http://patchwork.ozlabs.org/api/1.1/people/59/?format=json","name":"David Howells","email":"dhowells@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260420083705.1009074-9-dhowells@redhat.com/mbox/","series":[{"id":500568,"url":"http://patchwork.ozlabs.org/api/1.1/series/500568/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=500568","date":"2026-04-20T08:36:52","name":"netfs: Further miscellaneous fixes","version":1,"mbox":"http://patchwork.ozlabs.org/series/500568/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2225010/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2225010/checks/","tags":{},"headers":{"Return-Path":"\n <linux-cifs+bounces-10931-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-cifs@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=h86SMyOQ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10931-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.b=\"h86SMyOQ\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=170.10.129.124","smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=redhat.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=redhat.com"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzfD64RN0z1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 18:44:06 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id CEE9D30DFACC\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 08:38:28 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 89E6F389472;\n\tMon, 20 Apr 2026 08:38:02 +0000 (UTC)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id F15F638945C\n\tfor <linux-cifs@vger.kernel.org>; Mon, 20 Apr 2026 08:37:59 +0000 (UTC)","from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-467-sRAaOMn4OZqrasR8f5rHrA-1; Mon,\n 20 Apr 2026 04:37:56 -0400","from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 8668C1955F0E;\n\tMon, 20 Apr 2026 08:37:54 +0000 (UTC)","from warthog.procyon.org.com (unknown [10.44.48.17])\n\tby mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 8BC801800660;\n\tMon, 20 Apr 2026 08:37:51 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776674282; cv=none;\n b=efQoMs+KdhSCNo3Zi5Im81Y9MTqjs0o3GAoxX99x76rnUiRnF7vcMt3H87mDqqg1ix+XUObWlRoFqPh9F6H6edIkfx2Ijm5v2h8eVZxKOu6n4fiP/btFs9kgtaeBF0zMwmQlHqUPqtr7EbBw+iKKX7NxblpTy4d89mrI44WV7Yo=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776674282; c=relaxed/simple;\n\tbh=GGDFb5ISDq+aR8ATjSzxtl5omBuaGFifLzzJCHqEBkw=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=jHz8frWRy1G/yCYYeMI/LjBqaROqObPSzA+mvWFqZAHyUHE41uyVJCBBsXHAaHE6Pr0AOGsIdExZQRgfr7Boql45k3x9lZ31+3vEIEk8MyNwJF2AhWqslx+k14jQQFo0j+0rJGOFNlLW2Wgahl8VpRm6OtCgIAnktwKrCdaQpxE=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=redhat.com;\n spf=pass smtp.mailfrom=redhat.com;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.b=h86SMyOQ; arc=none smtp.client-ip=170.10.129.124","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1776674279;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=OThphTeJ4h2mrXd17LwJkpBdeaA+i2LzOzBKWtPenbI=;\n\tb=h86SMyOQXboDEAqaggqxx69A1R7Dh+FA8hM/62mVoUkwA5XvPm/xT4dIxu6LV93hz0r7SN\n\tc3F6nNlbbReO9bl0ZGSWBtwXo/HKPn4N7VxDC4JfSzIBmDVWX0sck2JeBKSYcfS95YuFZ5\n\tF/JAcrCzbgSsfbCAjpknr47MM4lfsw0=","X-MC-Unique":"sRAaOMn4OZqrasR8f5rHrA-1","X-Mimecast-MFC-AGG-ID":"sRAaOMn4OZqrasR8f5rHrA_1776674274","From":"David Howells <dhowells@redhat.com>","To":"Christian Brauner <christian@brauner.io>","Cc":"David Howells <dhowells@redhat.com>,\n\tPaulo Alcantara <pc@manguebit.org>,\n\tnetfs@lists.linux.dev,\n\tlinux-afs@lists.infradead.org,\n\tlinux-cifs@vger.kernel.org,\n\tceph-devel@vger.kernel.org,\n\tlinux-fsdevel@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tMatthew Wilcox <willy@infradead.org>","Subject":"[PATCH 08/11] netfs: Fix group handling in netfs_read_gaps()","Date":"Mon, 20 Apr 2026 09:36:59 +0100","Message-ID":"<20260420083705.1009074-9-dhowells@redhat.com>","In-Reply-To":"<20260420083705.1009074-1-dhowells@redhat.com>","References":"<20260420083705.1009074-1-dhowells@redhat.com>","Precedence":"bulk","X-Mailing-List":"linux-cifs@vger.kernel.org","List-Id":"<linux-cifs.vger.kernel.org>","List-Subscribe":"<mailto:linux-cifs+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-cifs+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.111"},"content":"Fix netfs_read_gaps() to not discard the group information from the\nnetfs_folio struct after successfully reading the gaps.  This is still\nneeded to write back the dirty data.\n\nFixes: d259cfb7dd32 (\"netfs: Fix read-gaps to remove netfs_folio from filled folio\")\nCloses: https://sashiko.dev/#/patchset/20260414082004.3756080-1-dhowells%40redhat.com\nSigned-off-by: David Howells <dhowells@redhat.com>\ncc: Paulo Alcantara <pc@manguebit.org>\ncc: Matthew Wilcox <willy@infradead.org>\ncc: netfs@lists.linux.dev\ncc: linux-fsdevel@vger.kernel.org\n---\n fs/netfs/buffered_read.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)","diff":"diff --git a/fs/netfs/buffered_read.c b/fs/netfs/buffered_read.c\nindex b4d271538f75..98bfec0af0e1 100644\n--- a/fs/netfs/buffered_read.c\n+++ b/fs/netfs/buffered_read.c\n@@ -461,8 +461,10 @@ static int netfs_read_gaps(struct file *file, struct folio *folio)\n \n \tret = netfs_wait_for_read(rreq);\n \tif (ret >= 0) {\n-\t\tfolio_detach_private(folio);\n-\t\tnetfs_put_group(group);\n+\t\tif (group)\n+\t\t\tfolio_change_private(folio, group);\n+\t\telse\n+\t\t\tfolio_detach_private(folio);\n \t\tkfree(finfo);\n \t\ttrace_netfs_folio(folio, netfs_folio_trace_filled_gaps);\n \t\tflush_dcache_folio(folio);\n","prefixes":["08/11"]}