Message ID | 20220131105217.272730572@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> 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 76F52C433EF for <stable@archiver.kernel.org>; Mon, 31 Jan 2022 11:00:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358415AbiAaLA6 (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 31 Jan 2022 06:00:58 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:60614 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348645AbiAaLAJ (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 31 Jan 2022 06:00:09 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5B55760B03; Mon, 31 Jan 2022 11:00:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A34EC340EF; Mon, 31 Jan 2022 11:00:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643626808; bh=QS+rHwM5FkMxeZz8bHDNTNPX8CJF2uRNcfo1OIB6xRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PrlTT+I6bAslqPN4t/oGIOwXxCAz5kajlhB9yfEpH9v9Icw40MN04TxKuCu96MYd/ ggQ+oEo9w8CNNQtINi2QF43XYbUZw5aBS3km6L6VexCOsx6aov6JZOcU5xDo8T74yh E1VbWf6tJ+HLBqfz4w5DvXPkz9SyIK34oHqrrJC4= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Trond Myklebust <trond.myklebust@hammerspace.com>, Anna Schumaker <Anna.Schumaker@Netapp.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 5.4 47/64] NFS: Ensure the server has an up to date ctime before hardlinking Date: Mon, 31 Jan 2022 11:56:32 +0100 Message-Id: <20220131105217.272730572@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220131105215.644174521@linuxfoundation.org> References: <20220131105215.644174521@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: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -2053,6 +2053,8 @@ nfs_link(struct dentry *old_dentry, stru trace_nfs_link_enter(inode, dir, dentry); d_drop(dentry); + if (S_ISREG(inode->i_mode)) + nfs_sync_inode(inode); error = NFS_PROTO(dir)->link(inode, dir, &dentry->d_name); if (error == 0) { ihold(inode);