Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274670
b: refs/heads/master
c: cfbffc3
h: refs/heads/master
v: v3
  • Loading branch information
Tsutomu Itoh authored and David Sterba committed Oct 20, 2011
1 parent d00e078 commit d829b89
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 10b2f34d6e7fbe07f498cb2006272e9a561f5e60
refs/heads/master: cfbffc39ac89dbd5197cbeec2599a1128eb928f8
17 changes: 7 additions & 10 deletions trunk/fs/btrfs/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d829b89

Please sign in to comment.