From patchwork Mon Dec 6 14:55:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 522223 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 23089C433FE for ; Mon, 6 Dec 2021 15:08:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244189AbhLFPLl (ORCPT ); Mon, 6 Dec 2021 10:11:41 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:57558 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347070AbhLFPID (ORCPT ); Mon, 6 Dec 2021 10:08:03 -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 DEF4D612D3; Mon, 6 Dec 2021 15:04:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE4D4C341C1; Mon, 6 Dec 2021 15:04:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1638803073; bh=vGKg4XJnlC2rLqxy6AMLtQpcsXf2Ig9OjiDXLA84ljk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JcrcMmNghK4NboJRkiB4nVkuE08YwSukJCcUazgDTmQvuh9pPQgne9ugaUR7JVEYY a7AQt3xxbrzB1XfjSBUMmBk7QPX4C2MYzpYM2Z7NRQ5Qr1IfiDXQnEabR9lcZ1OhP8 x1ckkEmNeSgwvpYmi154X9ND6UWtm7Py/57/EfSw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Trond Myklebust , Sasha Levin Subject: [PATCH 4.14 019/106] NFSv42: Dont fail clone() unless the OP_CLONE operation failed Date: Mon, 6 Dec 2021 15:55:27 +0100 Message-Id: <20211206145556.038875706@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211206145555.386095297@linuxfoundation.org> References: <20211206145555.386095297@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Trond Myklebust [ Upstream commit d3c45824ad65aebf765fcf51366d317a29538820 ] The failure to retrieve post-op attributes has no bearing on whether or not the clone operation itself was successful. We must therefore ignore the return value of decode_getfattr() when looking at the success or failure of nfs4_xdr_dec_clone(). Fixes: 36022770de6c ("nfs42: add CLONE xdr functions") Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- fs/nfs/nfs42xdr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c index 5966e1e7b1f51..09c683402f950 100644 --- a/fs/nfs/nfs42xdr.c +++ b/fs/nfs/nfs42xdr.c @@ -625,8 +625,7 @@ static int nfs4_xdr_dec_clone(struct rpc_rqst *rqstp, status = decode_clone(xdr); if (status) goto out; - status = decode_getfattr(xdr, res->dst_fattr, res->server); - + decode_getfattr(xdr, res->dst_fattr, res->server); out: res->rpc_status = status; return status;