Message ID | 20200827002856.1131-3-allison.henderson@oracle.com (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show
Return-Path: <SRS0=R4OI=CF=vger.kernel.org=linux-xfs-owner@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E73AC1751 for <patchwork-linux-xfs@patchwork.kernel.org>; Thu, 27 Aug 2020 00:29:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE70C2087C for <patchwork-linux-xfs@patchwork.kernel.org>; Thu, 27 Aug 2020 00:29:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Akr3rD8Z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726770AbgH0A3L (ORCPT <rfc822;patchwork-linux-xfs@patchwork.kernel.org>); Wed, 26 Aug 2020 20:29:11 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:37640 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbgH0A3K (ORCPT <rfc822;linux-xfs@vger.kernel.org>); Wed, 26 Aug 2020 20:29:10 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07R0Fmnm144966 for <linux-xfs@vger.kernel.org>; Thu, 27 Aug 2020 00:29:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2020-01-29; bh=DPwWtPRw65CbMoFiBNruIGBDecWUzX6hlFBSzqV8Hv0=; b=Akr3rD8Zl0AxGaSblJMaHEw0OANvt4mZwh8gIIQ9Ml/NxS6pA4g3xnjk3IzwcUn+CJoo QPOipVUz9bTBJS/JMSRdPrKhQKT6MXR/mJyeo1ejOEtD9UY2L1tsALLFbzbuUhySHZuM odp5pIi6istJQssC1s92wA1ycJ6hcv2H59wGbZn4JbiMfhMnzLBnpUi0KMcy0J+1MmnH o2J/qsmG9vltiuq1djAoU7zJYU8Taqnkh5gYHXSFQRurTOv09PV4IZs5D6V66k0XcMTX geBjaxGfjmWVYkvCl51MCQLOdrQK7qd5De59+VmCS66MaQhRWC8iScs90JUJUaWiofdi bA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 333w6u1yvr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for <linux-xfs@vger.kernel.org>; Thu, 27 Aug 2020 00:29:09 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07R0AH3V121713 for <linux-xfs@vger.kernel.org>; Thu, 27 Aug 2020 00:29:09 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 333rubkfyq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <linux-xfs@vger.kernel.org>; Thu, 27 Aug 2020 00:29:08 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 07R0T7A3024784 for <linux-xfs@vger.kernel.org>; Thu, 27 Aug 2020 00:29:07 GMT Received: from localhost.localdomain (/67.1.244.254) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 26 Aug 2020 17:29:07 -0700 From: Allison Collins <allison.henderson@oracle.com> To: linux-xfs@vger.kernel.org Subject: [PATCH v12 02/32] xfsprogs: Check for -ENOATTR or -EEXIST Date: Wed, 26 Aug 2020 17:28:26 -0700 Message-Id: <20200827002856.1131-3-allison.henderson@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200827002856.1131-1-allison.henderson@oracle.com> References: <20200827002856.1131-1-allison.henderson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9725 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 bulkscore=0 suspectscore=1 spamscore=0 mlxscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008270000 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9725 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 impostorscore=0 mlxlogscore=999 suspectscore=1 phishscore=0 malwarescore=0 spamscore=0 priorityscore=1501 clxscore=1015 mlxscore=0 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008270000 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: <linux-xfs.vger.kernel.org> X-Mailing-List: linux-xfs@vger.kernel.org |
Series |
xfsprogs: Delayed Attributes
|
expand
|
diff --git a/libxfs/xfs_attr.c b/libxfs/xfs_attr.c index 056caa1..e519ecc 100644 --- a/libxfs/xfs_attr.c +++ b/libxfs/xfs_attr.c @@ -404,6 +404,15 @@ xfs_attr_set( args->total, 0, quota_flags); if (error) goto out_trans_cancel; + + error = xfs_has_attr(args); + if (error == -EEXIST && (args->attr_flags & XATTR_CREATE)) + goto out_trans_cancel; + if (error == -ENOATTR && (args->attr_flags & XATTR_REPLACE)) + goto out_trans_cancel; + if (error != -ENOATTR && error != -EEXIST) + goto out_trans_cancel; + error = xfs_attr_set_args(args); if (error) goto out_trans_cancel; @@ -411,6 +420,10 @@ xfs_attr_set( if (!args->trans) goto out_unlock; } else { + error = xfs_has_attr(args); + if (error != -EEXIST) + goto out_trans_cancel; + error = xfs_attr_remove_args(args); if (error) goto out_trans_cancel;