Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2556797pxj; Mon, 10 May 2021 05:52:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi40KNpEmdEjDZvc6oEgZRMVCtTLG7bvoAiIYP1Q7P1gr3Tt6jqhEzDde2DMHZ0xsKISfG X-Received: by 2002:a05:6e02:882:: with SMTP id z2mr12136785ils.91.1620651175890; Mon, 10 May 2021 05:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620651175; cv=none; d=google.com; s=arc-20160816; b=CJtoIUGIZuzMdR6QhpTW/z5Mmvb4tcKrlJy1Jlt0t6mdb+5LodfarLYQeW67ILwIcK 7Hh4I/HuDPasqjrYYpHUayMYKnA7RjT9nyXDSf2LRMk46Lt6Ifqd0O6R2TW1euFl8Ciu mfv/GdArFVakO7nozfCmpO5C98ytMhplTTOfOZdUjjrtFq890HceEawI308MKV4E0kA5 WLOQzoHlwOGXf+ek1MtESC5uZ6//Ddyf/re+e3xzubPDGmFwvspcfN4cVSea7tTm8EeH yqYqtKnuRi5+yCiuap7siclmzKmK2KBu3ufZ4Xb6vhVxp6jhS6jfDEb6W1l3pkRuhjMS eQKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aP6vsldme6qZrdIPNdKFE/aKm8r+eLvep2U4H5dxkL8=; b=iLq3XcwmWu4b3A7vr/PZzxHQYRMFUV7jfbG//a5dWw/oQTmS8yG3z3Hmqox+Q/zv1w Qawhsha+Y9mQ3RYluoV2Y3C/maVUD1NWqaTdlwY60KUG8YeLuU+T7PF5ylEl91VOdCNH npKkU5AkuBEOMwS3ReI3sUeEwV5M+z0A/GvtW2SKg6AoE1kLD5CqN4pCNvBc3v0ZN9Ad OA3MvUiyEJJZhhYoVpsQfuW4SE3uoXF3W40Ukd+Q/urV4HfMPh5twgLP3WuxgeXiMq0o 7DGx1RY+7FOlJiOEFuIKuajuRwxYxMAK8fHitocXUT4/woPQKGONAgLwYdyLQt5pC9in LIsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yP5gWY1w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m35si1047356jav.67.2021.05.10.05.52.43; Mon, 10 May 2021 05:52:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yP5gWY1w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348908AbhEJMro (ORCPT + 99 others); Mon, 10 May 2021 08:47:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:56112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233671AbhEJLOP (ORCPT ); Mon, 10 May 2021 07:14:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6C3C961285; Mon, 10 May 2021 11:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620645048; bh=vc4YkXsp9LYCBLtu1We7x1zKPK4f0rGvM9IOT7u5xfE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yP5gWY1wV9qXoV6P5BfCsMlMPPHzftWHPLJe3va+40he3nWhfxTOdQEB+fuj5fc4X kTdNZLRxfX2PWQKV4bVLF8fUFUFfDO9Dlt7yvQP+CfwQQt5JX2LveX7omcz3FWTmQF ob82qCQcIhCaLcp4LoZfhIpuLlFklkKdcquzzhMI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joel Stanley , Christoph Hellwig , Lei YU , Richard Weinberger Subject: [PATCH 5.12 303/384] jffs2: Hook up splice_write callback Date: Mon, 10 May 2021 12:21:32 +0200 Message-Id: <20210510102024.789996884@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102014.849075526@linuxfoundation.org> References: <20210510102014.849075526@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joel Stanley commit 42984af09afc414d540fcc8247f42894b0378a91 upstream. overlayfs using jffs2 as the upper filesystem would fail in some cases since moving to v5.10. The test case used was to run 'touch' on a file that exists in the lower fs, causing the modification time to be updated. It returns EINVAL when the bug is triggered. A bisection showed this was introduced in v5.9-rc1, with commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops"). Reverting that commit restores the expected behaviour. Some digging showed that this was due to jffs2 lacking an implementation of splice_write. (For unknown reasons the warn_unsupported that should trigger was not displaying any output). Adding this patch resolved the issue and the test now passes. Cc: stable@vger.kernel.org Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Signed-off-by: Joel Stanley Reviewed-by: Christoph Hellwig Tested-by: Lei YU Signed-off-by: Richard Weinberger Signed-off-by: Greg Kroah-Hartman --- fs/jffs2/file.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/jffs2/file.c +++ b/fs/jffs2/file.c @@ -57,6 +57,7 @@ const struct file_operations jffs2_file_ .mmap = generic_file_readonly_mmap, .fsync = jffs2_fsync, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, }; /* jffs2_file_inode_operations */