From patchwork Mon May 10 10:21:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 433081 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2750352jao; Mon, 10 May 2021 04:34:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzq30l2qIFADTF3AbXVNrhLIyp/FQp20hyNaJn99OQsVNPi+kTBlx0Z73/qSvpkD5umZIAB X-Received: by 2002:a05:6402:5111:: with SMTP id m17mr29180073edd.343.1620646375491; Mon, 10 May 2021 04:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620646375; cv=none; d=google.com; s=arc-20160816; b=wkANXSkdiBgb4WEOubIEUYhbrGG0sAmP+f/OIDYuAppSXe8kTy3AK2glEBUAOYIhgv 5lVklnh1sOMBi1VmfUiAL6IaF2YW8jVbe6MrbVIM5zkUWOSHH+UaoBHtIs0/fgY14IWj HhfxCrp0eNNz1zszkcDsCqxSmW4z2lM9D9aOGaDbgtJVCh/9Z0JnI63s2dybDTeGEo5B +ymnu0MeLgE7kZi7d8J+TABTugYYfa9WBd+0lJdh+S1TSbjJMjBqFqGgrFabe/6IU+WC 4seZNkJvc/i5bWnwwl64p+LOFfEa82zcfaXadxB90iVGVGjRE24YPVHkvqdNOhD4klZl fAjA== 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=TXwgi7NZ92K11DKFpDH88/8lvZDoqZXNbvPR4SQnv6cXJgnbN3h7Mlpj1u6NHQpAtC KVeTl5ZH6NhRB+YXOjOy1ObgLuzXfTfyr5GeQ0+vt2jPq2evqWk63muT54BXXI5z1F/R rV5FlEXQrrQHOIxwsphlP0E1V2/RdI8pU2G9J7b6l3AnnDxu2DDWC9KDI728ajs4zGvL GYQCh/rPKP2AzRE6yjeJooQnBsMlPGMOzzB1aukeGpDqfURdXtwWoekG+hP+1QqZHo0P VAUCMnueDiHZjS7MU72Mmxo4y/TXEyF95nvA2o5ta1uTQni9RjDnb/V3VD6FXWsFvtvE fo3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=T3cHDcWQ; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 r17si13500365edw.273.2021.05.10.04.32.55; Mon, 10 May 2021 04:32:55 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=T3cHDcWQ; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S236761AbhEJLKU (ORCPT + 12 others); Mon, 10 May 2021 07:10:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:35596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234365AbhEJLDT (ORCPT ); Mon, 10 May 2021 07:03:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E7DD36162B; Mon, 10 May 2021 10:54:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620644058; bh=vc4YkXsp9LYCBLtu1We7x1zKPK4f0rGvM9IOT7u5xfE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T3cHDcWQ3STjWWLFBhR5fP93NgQnp8OAON0YQ6uLqI5YM0qOjFr7m/cJ1MSPWjhJq b4fMm2WEZnsbZgwxdFfB5U96KHDVPcTI2/iTQiXEk5VpXrIxP3QcHdSBVdJe49mMLk vDnct3CsBYigsfq3zIoUum/Sx+Axx4S45sonVZdY= 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.11 270/342] jffs2: Hook up splice_write callback Date: Mon, 10 May 2021 12:21:00 +0200 Message-Id: <20210510102019.020801528@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102010.096403571@linuxfoundation.org> References: <20210510102010.096403571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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 */