From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F174930F80 for ; Wed, 20 Sep 2023 12:43:31 +0000 (UTC) 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 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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; }