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 X-Spam-Level: X-Spam-Status: No, score=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95B24C432C3 for ; Thu, 11 Feb 2021 15:19:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6BDF664F37 for ; Thu, 11 Feb 2021 15:19:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229937AbhBKPTm (ORCPT ); Thu, 11 Feb 2021 10:19:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:51648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230097AbhBKPNT (ORCPT ); Thu, 11 Feb 2021 10:13:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2707664EF2; Thu, 11 Feb 2021 15:04:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613055892; bh=Tu/ihzwj0fdIKZC3D8WmvryBsJDFFHOXxBFv25QlwuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KaJkMuVU1FYkbfKAjn8rXIsd8aCiTAsKDoZJuYAGHe2lG9lNlLkbcFO70WRaGeBJe 9KqhzDgTBQze0OXeXmmXFVcN2olearzOxXqp/YYEyHlA1H2Vd4/0p5VdEpuxM30aYn 5vkGHW578IxU7JKzjW+Gi+jP4bRNEITL3jEmbo4I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joachim Henke , Ryusuke Konishi , Andrew Morton , Linus Torvalds Subject: [PATCH 5.10 49/54] nilfs2: make splice write available again Date: Thu, 11 Feb 2021 16:02:33 +0100 Message-Id: <20210211150155.010025735@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210211150152.885701259@linuxfoundation.org> References: <20210211150152.885701259@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: stable@vger.kernel.org From: Joachim Henke commit a35d8f016e0b68634035217d06d1c53863456b50 upstream. Since 5.10, splice() or sendfile() to NILFS2 return EINVAL. This was caused by commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops"). This patch initializes the splice_write field in file_operations, like most file systems do, to restore the functionality. Link: https://lkml.kernel.org/r/1612784101-14353-1-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Joachim Henke Signed-off-by: Ryusuke Konishi Tested-by: Ryusuke Konishi Cc: [5.10+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- fs/nilfs2/file.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/nilfs2/file.c +++ b/fs/nilfs2/file.c @@ -141,6 +141,7 @@ const struct file_operations nilfs_file_ /* .release = nilfs_release_file, */ .fsync = nilfs_sync_file, .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, }; const struct inode_operations nilfs_file_inode_operations = {