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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27EACCE79D2 for ; Wed, 20 Sep 2023 12:43:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236099AbjITMni (ORCPT ); Wed, 20 Sep 2023 08:43:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236186AbjITMnh (ORCPT ); Wed, 20 Sep 2023 08:43:37 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23E5B8F for ; Wed, 20 Sep 2023 05:43:32 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E8CAC433C8; Wed, 20 Sep 2023 12:43:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1695213811; bh=/PT6JR29A2mKBleq1vhTNI6kmB+ycrF0jr8AgDA9sBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x1cUdtkQ+Qik+VzAuQLTJJiIzJqch6I5b5JOY4Jx/ZWJrv4IaG+6I58/MxZG3Vgx8 ATY72IkkttCS9ec0tG7hIcVfDsIXeI3q8nyINhrrk9ClOu24bDsT7fDGN9vlQTIbl1 bfXRvimTIlyIZ6MLmxynqSgmq/UL8XLf4vt29KAU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhi Li , Benjamin Coddington , Jeff Layton , Chuck Lever Subject: [PATCH 5.4 360/367] nfsd: fix change_info in NFSv4 RENAME replies Date: Wed, 20 Sep 2023 13:32:17 +0200 Message-ID: <20230920112907.806754797@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230920112858.471730572@linuxfoundation.org> References: <20230920112858.471730572@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jeff Layton commit fdd2630a7398191e84822612e589062063bd4f3d upstream. nfsd sends the transposed directory change info in the RENAME reply. The source directory is in save_fh and the target is in current_fh. Reported-by: Zhi Li Reported-by: Benjamin Coddington Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2218844 Signed-off-by: Jeff Layton Cc: Signed-off-by: Chuck Lever Signed-off-by: Greg Kroah-Hartman --- fs/nfsd/nfs4proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -865,8 +865,8 @@ nfsd4_rename(struct svc_rqst *rqstp, str rename->rn_tname, rename->rn_tnamelen); if (status) return status; - set_change_info(&rename->rn_sinfo, &cstate->current_fh); - set_change_info(&rename->rn_tinfo, &cstate->save_fh); + set_change_info(&rename->rn_sinfo, &cstate->save_fh); + set_change_info(&rename->rn_tinfo, &cstate->current_fh); return nfs_ok; }