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 C30A030FA7 for ; Wed, 20 Sep 2023 12:24:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 469AFC433C9; Wed, 20 Sep 2023 12:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1695212643; bh=+pbIyj4kQGNRz1XijLQ3JJJfvl51tvhjsY8n5kzUmUs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xj0wqVRUvYLDzHx9Z9EVgQAxKwYeE7MVqg5BBu0mdntcMGuBLeV9z8NYq4dGsX0Ks xl90POjTWlPu0SEYEznJHIt3gEecxcLur4qXdDRo76nPvJgthIa9bJoiJJQv1bj+tf fpZQ5GOizbt5W3cPDgQVn2UUR/Yul5FfvNHA/P0Y= 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.10 77/83] nfsd: fix change_info in NFSv4 RENAME replies Date: Wed, 20 Sep 2023 13:32:07 +0200 Message-ID: <20230920112829.703434745@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230920112826.634178162@linuxfoundation.org> References: <20230920112826.634178162@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.10-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 @@ -881,8 +881,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; }