From patchwork Sat May 29 09:48:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 103030 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4T9mvTB027264 for ; Sat, 29 May 2010 09:48:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755929Ab0E2Jsz (ORCPT ); Sat, 29 May 2010 05:48:55 -0400 Received: from ey-out-2122.google.com ([74.125.78.24]:38432 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754108Ab0E2Jsy (ORCPT ); Sat, 29 May 2010 05:48:54 -0400 Received: by ey-out-2122.google.com with SMTP id d26so122044eyd.19 for ; Sat, 29 May 2010 02:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=dNAhgOXxG15JivhB6eryLkivkIA5cFnNe0hnr/QOkdk=; b=LRTZGEInuJUfW70wBT63ZreNC0ZxPZoQg+4dDg7MPjBbTr24B7A2+4UI9arGgDbL4P S48q1YqEoRBMvrVTctVB72iL90hUP10TUgsO03QJpZ9RMk452MxluUK95rs3s+20Yx60 pf0w/PYUf4gMw61u4QM6ACkeSagmVwG0pE3ms= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=EmBABA0PhhczfYKhwd6VH9FDr2XOGdtyMq10mGX2yOvrqMmePIdG9eR1w29UmjkHvw Z1+oQx1NMp76y5rn2c3tGnEOPEcOuyVmMuRoa+kuYeL2QXFW2QB03TcYHDfbESTMw9rm 5R6kD4hwEy5+b0tLEv3aHLlkU/OJpbLDIiYGg= Received: by 10.213.35.193 with SMTP id q1mr1675195ebd.30.1275126532821; Sat, 29 May 2010 02:48:52 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id 15sm1706933ewy.12.2010.05.29.02.48.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 29 May 2010 02:48:52 -0700 (PDT) Date: Sat, 29 May 2010 11:48:35 +0200 From: Dan Carpenter To: linux-btrfs@vger.kernel.org Cc: Al Viro , Stephen Hemminger , Joel Becker , James Morris , Chris Mason , kernel-janitors@vger.kernel.org Subject: [patch 10/11] btrfs: handle ERR_PTR from posix_acl_from_xattr() Message-ID: <20100529094835.GK5483@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 29 May 2010 09:48:58 +0000 (UTC) diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 8d432cd..e24a19a 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -60,6 +60,8 @@ static struct posix_acl *btrfs_get_acl(struct inode *inode, int type) size = __btrfs_getxattr(inode, name, value, size); if (size > 0) { acl = posix_acl_from_xattr(value, size); + if (IS_ERR(acl)) + return acl; set_cached_acl(inode, type, acl); } kfree(value);