Message ID | 1413961033-24871-1-git-send-email-jack@suse.cz (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <ocfs2-devel-bounces@oss.oracle.com> X-Original-To: patchwork-ocfs2-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D8F79C11AC for <patchwork-ocfs2-devel@patchwork.kernel.org>; Wed, 22 Oct 2014 06:58:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D01420166 for <patchwork-ocfs2-devel@patchwork.kernel.org>; Wed, 22 Oct 2014 06:58:19 +0000 (UTC) Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E93C92015E for <patchwork-ocfs2-devel@patchwork.kernel.org>; Wed, 22 Oct 2014 06:58:17 +0000 (UTC) Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s9M6w1gY005267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 22 Oct 2014 06:58:03 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9M6vrML020788 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Oct 2014 06:57:53 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <ocfs2-devel-bounces@oss.oracle.com>) id 1Xgprl-0005Rw-0x; Tue, 21 Oct 2014 23:57:53 -0700 Received: from ucsinet21.oracle.com ([156.151.31.93]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from <jack@suse.cz>) id 1XgprD-0005RH-H4 for ocfs2-devel@oss.oracle.com; Tue, 21 Oct 2014 23:57:19 -0700 Received: from userp1020.oracle.com (userp1020.oracle.com [156.151.31.79]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9M6vIS2018104 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <ocfs2-devel@oss.oracle.com>; Wed, 22 Oct 2014 06:57:18 GMT Received: from aserp2030.oracle.com (aserp2030.oracle.com [141.146.126.74]) by userp1020.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s9M6vHwm030155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <ocfs2-devel@oss.oracle.com>; Wed, 22 Oct 2014 06:57:18 GMT Received: from pps.filterd (aserp2030.oracle.com [127.0.0.1]) by aserp2030.oracle.com (8.14.7/8.14.7) with SMTP id s9M6vFBP037282 for <ocfs2-devel@oss.oracle.com>; Wed, 22 Oct 2014 06:57:17 GMT Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by aserp2030.oracle.com with ESMTP id 1q5xa4e5fd-1 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NOT) for <ocfs2-devel@oss.oracle.com>; Wed, 22 Oct 2014 06:57:17 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 50FE8AB08; Wed, 22 Oct 2014 06:57:15 +0000 (UTC) Received: by quack.suse.cz (Postfix, from userid 1000) id A8CA581C69; Wed, 22 Oct 2014 08:57:14 +0200 (CEST) From: Jan Kara <jack@suse.cz> To: ocfs2-devel@oss.oracle.com Date: Wed, 22 Oct 2014 08:57:13 +0200 Message-Id: <1413961033-24871-1-git-send-email-jack@suse.cz> X-Mailer: git-send-email 1.8.1.4 X-ServerName: cantor2.suse.de X-Proofpoint-Virus-Version: vendor=nai engine=5600 definitions=7598 signatures=670556 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1410220074 Cc: Mark Fasheh <mfasheh@suse.com>, Jan Kara <jack@suse.cz> Subject: [Ocfs2-devel] [PATCH] ocfs2: Fix xattr check in ocfs2_get_xattr_nolock() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: <ocfs2-devel.oss.oracle.com> List-Unsubscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=unsubscribe> List-Archive: <http://oss.oracle.com/pipermail/ocfs2-devel> List-Post: <mailto:ocfs2-devel@oss.oracle.com> List-Help: <mailto:ocfs2-devel-request@oss.oracle.com?subject=help> List-Subscribe: <https://oss.oracle.com/mailman/listinfo/ocfs2-devel>, <mailto:ocfs2-devel-request@oss.oracle.com?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 016f01df3825..662f8dee149f 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -1284,7 +1284,7 @@ int ocfs2_xattr_get_nolock(struct inode *inode, return -EOPNOTSUPP; if (!(oi->ip_dyn_features & OCFS2_HAS_XATTR_FL)) - ret = -ENODATA; + return -ENODATA; xis.inode_bh = xbs.inode_bh = di_bh; di = (struct ocfs2_dinode *)di_bh->b_data;
ocfs2_get_xattr_nolock() checks whether inode as any extended attributes (OCFS2_HAS_XATTR_FL). If not, it just sets 'ret' to -ENODATA but continues with checking inline and external attributes anyway (which is pointless although it does not harm). Just return immediately when we know there are not extended attributes in the inode. Coverity-id: 1226906 CC: Mark Fasheh <mfasheh@suse.com> CC: Joel Becker <jlbec@evilplan.org> Signed-off-by: Jan Kara <jack@suse.cz> --- fs/ocfs2/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)