Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3300265ybl; Mon, 19 Aug 2019 16:12:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5RhWyI87N3lsZ1Xfw2komwr9VfiRPGk3ehPwV/OO/R95K5Dpv66EVoXJnLP9miwgtrMj7 X-Received: by 2002:a17:90a:8a11:: with SMTP id w17mr11410872pjn.139.1566256339489; Mon, 19 Aug 2019 16:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566256339; cv=none; d=google.com; s=arc-20160816; b=YMeMyFBGilmu28ui0KTGDX9IDsV1gxUPo4G8zIZJvuzCrxI9a0b012pSm25p1+ocU/ QrpkYsjLNODZl7ZrhhezFxAHv1hLP8xKeirIXF0TXfMxn5B1xH2rHBDPiUSUpcCHr9Mi FXlykc8+5zt9F4/UyV0WRIPMh/uJ0Sb+NSXDeXoTFf8YxDpVr8+D6Vzx6dF9TlMQJyGD IjKBNNmWUgRbxHjDi47+rz4lDTAMY+/4V+VCXiLC4ICmB3YzEr+wexxWwljp7zioZBrk xnVqJfrp1he0+LcgiUttcMLJOXuJsIiyCH0Z9piEnLa0E1zTSEM8xrLyM/b7J/8+BS5k Ookw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VwXXPTi3PJu3WoEKqDUGPJTQ2J6rMB91D0vpSCDwdFM=; b=InD5rJ7hbpmhQq9oRyDeDq7GVOiI9bkKWpToeAyeQ59vsWyPMTkQ6Y5a0duAtabMwy wustOIB3kS5iA/SCHr1Fyu3ffmwM63pAfQmUptr9RISLovLaMRtOEgRIzOK9/u7cKW5t YA/dPm9+7UrmpGoefCbOhB3J2IQ508G7FqgmVS5OYOECwCTqi+WXQzUEl5LJt+wpP4wH u7BbuJTpFwGPMrZaHMX0kQX9f9bZVKH4WBbHjVpw7fB3m8Ew+I5ErYi4Gu2mX1NMTUew ihvpYdopunfyjMEnJ0rZrfi9wI6FK2otq/oN4peA1ACUVF7/NZaEWuOPhSoPiHJMLzkE GnXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=H02CKvvP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o132si11321613pfg.249.2019.08.19.16.12.04; Mon, 19 Aug 2019 16:12:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=H02CKvvP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728618AbfHSXKi (ORCPT + 99 others); Mon, 19 Aug 2019 19:10:38 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:42284 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728204AbfHSXKi (ORCPT ); Mon, 19 Aug 2019 19:10:38 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7JNA2Hl004022; Mon, 19 Aug 2019 23:10:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2019-08-05; bh=VwXXPTi3PJu3WoEKqDUGPJTQ2J6rMB91D0vpSCDwdFM=; b=H02CKvvPw74ff4AzAmw4G8u8Lvj+tTzA++uIZsjhwJncfU0MjdDLpXWdpTC9a7ZVmlAa lsRTwvx4pRkA/IRPpQ33R9PMxe795MPlz4aB0KD3vmRKgyGjJePqcEJlxke/PfbVuHhB Ws6GO8j/dV7Nitni2hZV1S9KZlXUFyhviwgmPF/gniE6TD3T9iU41olCmfyQuhPwyDEs Iu43khsZeL96yxp7ML/+jLASRLG1yy+9c+fXoUT5sn8QFmwCzaE1ntRa7utbD8mYm4P1 fxUPWoKFwqDOsy1gzylMcnZjWVNdR0OQ+UGlkHNnNrnW2Ot4mi2sEnbamVixNJd6F8aF pw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2ue90tahkr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2019 23:10:36 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x7JN8LBJ190722; Mon, 19 Aug 2019 23:10:36 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 2ug267wtmb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Aug 2019 23:10:35 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x7JNAZ7j018438; Mon, 19 Aug 2019 23:10:35 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 19 Aug 2019 16:10:34 -0700 Date: Mon, 19 Aug 2019 16:10:31 -0700 From: "Darrick J. Wong" To: ira.weiny@intel.com Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs/xfs: Fix return code of xfs_break_leased_layouts() Message-ID: <20190819231031.GB1037350@magnolia> References: <20190819213918.29371-1-ira.weiny@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190819213918.29371-1-ira.weiny@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9354 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908190228 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9354 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908190228 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 19, 2019 at 02:39:18PM -0700, ira.weiny@intel.com wrote: > From: Ira Weiny > > The parens used in the while loop would result in error being assigned > the value 1 rather than the intended errno value. > > This is required to return -ETXTBSY from follow on break_layout() > changes. > > Signed-off-by: Ira Weiny Doh. Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_pnfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c > index 0c954cad7449..a339bd5fa260 100644 > --- a/fs/xfs/xfs_pnfs.c > +++ b/fs/xfs/xfs_pnfs.c > @@ -32,7 +32,7 @@ xfs_break_leased_layouts( > struct xfs_inode *ip = XFS_I(inode); > int error; > > - while ((error = break_layout(inode, false) == -EWOULDBLOCK)) { > + while ((error = break_layout(inode, false)) == -EWOULDBLOCK) { > xfs_iunlock(ip, *iolock); > *did_unlock = true; > error = break_layout(inode, true); > -- > 2.20.1 >