From: Andreas Gruenbacher Date: Mon, 9 Nov 2015 23:09:45 +0000 (+1100) Subject: xfs: Fix error path in xfs_get_acl X-Git-Tag: v4.4-rc1~30^2^2~2 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=edfb8ebce225a0638cf62591d4ccb502f052ffd4;p=cascardo%2Flinux.git xfs: Fix error path in xfs_get_acl Error codes from xfs_attr_get other than -ENOATTR were not properly reported. Fix that. In addition, the declaration of struct xfs_inode in xfs_acl.h isn't needed. Signed-off-by: Andreas Gruenbacher Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 763e36560681..6bb470fbb8e8 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c @@ -163,6 +163,7 @@ xfs_get_acl(struct inode *inode, int type) */ if (error == -ENOATTR) goto out_update_cache; + acl = ERR_PTR(error); goto out; } diff --git a/fs/xfs/xfs_acl.h b/fs/xfs/xfs_acl.h index 75af0a4d9028..52f8255d6bdf 100644 --- a/fs/xfs/xfs_acl.h +++ b/fs/xfs/xfs_acl.h @@ -20,7 +20,6 @@ struct inode; struct posix_acl; -struct xfs_inode; #ifdef CONFIG_XFS_POSIX_ACL extern struct posix_acl *xfs_get_acl(struct inode *inode, int type);