From: Dan Carpenter Date: Sat, 29 May 2010 09:48:35 +0000 (+0000) Subject: Btrfs: handle ERR_PTR from posix_acl_from_xattr() X-Git-Tag: v2.6.35-rc3~3^2~1 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;ds=sidebyside;h=834e74759a473f8101a273e843d1edec2778801d;p=net-next-2.6.git Btrfs: handle ERR_PTR from posix_acl_from_xattr() posix_acl_from_xattr() returns both ERR_PTRs and null, but it's OK to pass null values to set_cached_acl() Signed-off-by: Dan Carpenter Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index a372985b3a9..1606dc1e8d4 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);