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 2AF8ACE79D0 for ; Wed, 20 Sep 2023 11:59:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234827AbjITL7W (ORCPT ); Wed, 20 Sep 2023 07:59:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234833AbjITL7V (ORCPT ); Wed, 20 Sep 2023 07:59:21 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7BD9B6 for ; Wed, 20 Sep 2023 04:59:15 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AD30C433C7; Wed, 20 Sep 2023 11:59:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1695211155; bh=8kjsbFNqtsodVIeP9za1wknHTp3983FKw78oZMKVN2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y/Sac+qs4iyyAezTvhK2lCCaXmtlHE9eArKSfVtA3u3m8GaN1+dOZY6bL6tbB5eSw scXhQQ9zM9EPHItPKRkBfv8PH6NiVDNakLKnKVA+LM61RmLUWfUVcYtdoUdOUe9xSo GSNEsUSds+yaeys9mH7wNF3FJVWu80IKdaRhDxfQ= 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 6.1 128/139] nfsd: fix change_info in NFSv4 RENAME replies Date: Wed, 20 Sep 2023 13:31:02 +0200 Message-ID: <20230920112840.373411990@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230920112835.549467415@linuxfoundation.org> References: <20230920112835.549467415@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 6.1-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 @@ -1029,8 +1029,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; }