From patchwork Sat Aug 20 20:17:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 12949810 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2A5FC25B08 for ; Sat, 20 Aug 2022 20:17:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233870AbiHTUR4 (ORCPT ); Sat, 20 Aug 2022 16:17:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234193AbiHTUR4 (ORCPT ); Sat, 20 Aug 2022 16:17:56 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AFEF30570; Sat, 20 Aug 2022 13:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fD7vrQU4Z6TyVDACQCtFUO12NTMqAT8ivpKpMlldQjI=; b=kwUQDgmYF4rTLtMrROQoK9uYGE yty3SaaJSZt4cpR1dhlW3gibTu2D1srYQgRSvjyXfa2m/NbzoXK4qylAcziUpWYj8G762QNNm5Y8H OiOT3QGIl48Q+210OL6MRV5E0gijJT1b8Q8FWKzkySiIYEm2k7D3j67yP8EkIiVBr6l89lGuEBqug 3sphdZo6MDcgwyg5VRqPU3AR+Z8OqQbv2nxUuZ8rBd+60FWJRQLm2MSqnhU1k8FFg0xDNvOgf0GNu paNQlHUdLTkyYI+WgcE/iycYC9Ve9CQ0/L7tyNXgU4k8aC5UYp2c7Mx5UJ+FE8M7SNNmz+emZJ8Mj sEUFrSCw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oPUun-006TAV-Id; Sat, 20 Aug 2022 20:17:53 +0000 Date: Sat, 20 Aug 2022 21:17:53 +0100 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: linux-nfs@vger.kernel.org Subject: [PATCH 5/8] nfs_finish_open(): don't open-code file_inode() Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Signed-off-by: Al Viro --- fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index dbab3caa15ed..bcb2500c49b8 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -2022,7 +2022,7 @@ static int nfs_finish_open(struct nfs_open_context *ctx, err = finish_open(file, dentry, do_open); if (err) goto out; - if (S_ISREG(file->f_path.dentry->d_inode->i_mode)) + if (S_ISREG(file_inode(file)->i_mode)) nfs_file_set_open_context(file, ctx); else err = -EOPENSTALE; From patchwork Sat Aug 20 20:19:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 12949811 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23A9FC3F6B0 for ; Sat, 20 Aug 2022 20:19:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230111AbiHTUT4 (ORCPT ); Sat, 20 Aug 2022 16:19:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbiHTUT4 (ORCPT ); Sat, 20 Aug 2022 16:19:56 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B85E25C40; Sat, 20 Aug 2022 13:19:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ZPsz5dCfQLAnDB+pK1pbWEy1wzXIPKzrGENaRg4Npy8=; b=oLe3AE/VDOyqmFmTlUDO8Z83R3 WLIkM2ar0c3epxF37OyIYlYfZ6w3YxNMRlkIj3rYvjc/z/qi9wPzJsZeBU/lUQfKe8HRC8DsV4LaB mqMnTpcUeV1BEZwn1+2txnwzz65+jbhYZ+qFhPPRnKAHBa66CgMBNsfEPTpeKmb2oL2z2hw6uEq2G TKISRYHi70mzUe1bptZsepvnNZYYIzQtHVwhQUvzja5vtwjK4fJxCgmWWQJSZal05N3CUD0poQeh7 dlNySbEXym4Ld+2XVYlRR3NwCvfhu/YV0NYQteYU8QKxxhnDjq4+zIo/oRt/+LH6Rq/6KMBP5MTOt mKaiq4qg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oPUwj-006TCE-Nc; Sat, 20 Aug 2022 20:19:53 +0000 Date: Sat, 20 Aug 2022 21:19:53 +0100 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: linux-nfs@vger.kernel.org Subject: [PATCH 7/8] _nfs42_proc_copy(): use ->f_mapping instead of file_inode()->i_mapping Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Signed-off-by: Al Viro --- fs/nfs/nfs42proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 068c45b3bc1a..542502199005 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -336,7 +336,7 @@ static ssize_t _nfs42_proc_copy(struct file *src, return status; } } - status = nfs_filemap_write_and_wait_range(file_inode(src)->i_mapping, + status = nfs_filemap_write_and_wait_range(src->f_mapping, pos_src, pos_src + (loff_t)count - 1); if (status) return status;