diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-29 09:48:35 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-06-11 15:57:39 -0400 |
commit | 834e74759a473f8101a273e843d1edec2778801d (patch) | |
tree | f7009149bb1ca362737b2e6b7dc855326d90f079 /fs | |
parent | 15e7000095e6fc9ad07e476a100c900c72c14225 (diff) | |
download | kernel_samsung_tuna-834e74759a473f8101a273e843d1edec2778801d.zip kernel_samsung_tuna-834e74759a473f8101a273e843d1edec2778801d.tar.gz kernel_samsung_tuna-834e74759a473f8101a273e843d1edec2778801d.tar.bz2 |
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 <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/acl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index a372985..1606dc1 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); |