* [patch 10/11] btrfs: handle ERR_PTR from posix_acl_from_xattr()
@ 2010-05-29 9:48 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-05-29 9:48 UTC (permalink / raw)
To: linux-btrfs
Cc: Al Viro, Stephen Hemminger, Joel Becker, James Morris,
Chris Mason, kernel-janitors
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>
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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-29 9:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-29 9:48 [patch 10/11] btrfs: handle ERR_PTR from posix_acl_from_xattr() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).