[10/11] btrfs: handle ERR_PTR from posix_acl_from_xattr()
diff mbox

Message ID 20100529094835.GK5483@bicker
State New, archived
Headers show

Commit Message

Dan Carpenter May 29, 2010, 9:48 a.m. UTC
None

Patch
diff mbox

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);