Message ID | 20200921162035.336449230@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=lyed=C6=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 600F5C43465 for <stable@archiver.kernel.org>; Mon, 21 Sep 2020 16:42:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 262862399A for <stable@archiver.kernel.org>; Mon, 21 Sep 2020 16:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706548; bh=/+g3tl0tKR2B1dR6A3fWUZXSKcXBlnnKwUTXG4CoPQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=GGj4yty1lk29ZyjbEWOsO0zk+yCVWAw61h1q3svV7bG76oZ3Oc0ppCH4VKEZNwCKf H5A6pSd+i3MH0wfA1vp1W1B5EP/pdvWPqpS93WFZmA8KfXdRFLKbmODLG+s1+DbvUG nTdXumCMkz+Ag/qdKhNwGZedBFZeRMYE53OZ1n9c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729504AbgIUQm1 (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 21 Sep 2020 12:42:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:46446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729494AbgIUQmX (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 21 Sep 2020 12:42:23 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 64B6223976; Mon, 21 Sep 2020 16:42:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706542; bh=/+g3tl0tKR2B1dR6A3fWUZXSKcXBlnnKwUTXG4CoPQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=clCpZHJ1PwTfBdcVD7NvZqO0cN9EeNLR6GH5PhnODPfCjJ9d5xYPCz5XafqaqLknK YNNzvz/+arm/EnkkEaQr5xGOLOu1bV1qMs2snaW/EdQ9vOD7cSbeQYZgTTRqtRpnr6 YkRe4mc2Fuk45Lv91w8DEbnGR5/fpimljETpspaY= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>, Trond Myklebust <trond.myklebust@hammerspace.com>, Sasha Levin <sashal@kernel.org> Subject: [PATCH 4.19 15/49] NFS: Zero-stateid SETATTR should first return delegation Date: Mon, 21 Sep 2020 18:27:59 +0200 Message-Id: <20200921162035.336449230@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162034.660953761@linuxfoundation.org> References: <20200921162034.660953761@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 929f1d72bfd39..b2a2ff3f22a46 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3129,8 +3129,10 @@ static int _nfs4_do_setattr(struct inode *inode, /* Servers should only apply open mode checks for file size changes */ truncate = (arg->iap->ia_valid & ATTR_SIZE) ? true : false; - if (!truncate) + if (!truncate) { + nfs4_inode_make_writeable(inode); goto zero_stateid; + } if (nfs4_copy_delegation_stateid(inode, FMODE_WRITE, &arg->stateid, &delegation_cred)) { /* Use that stateid */