diff options
author | David Sterba <dsterba@suse.cz> | 2011-10-24 14:47:58 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2011-10-24 14:47:58 +0200 |
commit | a81d3b1ba2f5faae28ba7a092c7598673fa02ac2 (patch) | |
tree | 8301fefcd9f3d45be9d0030456a86bca5b9ff061 /fs/btrfs/acl.c | |
parent | afd582ac8f10382002a72b4d17d9c2db328ed8b8 (diff) | |
parent | f9d9ef62cd3ecbd6cbb7957a253c1e81f69d5586 (diff) | |
download | op-kernel-dev-a81d3b1ba2f5faae28ba7a092c7598673fa02ac2.zip op-kernel-dev-a81d3b1ba2f5faae28ba7a092c7598673fa02ac2.tar.gz |
Merge branch 'hotfixes-20111024/josef/for-chris' into btrfs-next-stable
Diffstat (limited to 'fs/btrfs/acl.c')
-rw-r--r-- | fs/btrfs/acl.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index eb159aa..89b156d 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -59,22 +59,19 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type) if (!value) return ERR_PTR(-ENOMEM); size = __btrfs_getxattr(inode, name, value, size); - if (size > 0) { - acl = posix_acl_from_xattr(value, size); - if (IS_ERR(acl)) { - kfree(value); - return acl; - } - set_cached_acl(inode, type, acl); - } - kfree(value); + } + if (size > 0) { + acl = posix_acl_from_xattr(value, size); } else if (size == -ENOENT || size == -ENODATA || size == 0) { /* FIXME, who returns -ENOENT? I think nobody */ acl = NULL; - set_cached_acl(inode, type, acl); } else { acl = ERR_PTR(-EIO); } + kfree(value); + + if (!IS_ERR(acl)) + set_cached_acl(inode, type, acl); return acl; } |