xfs: Fix error path in xfs_get_acl
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 9 Nov 2015 23:09:45 +0000 (10:09 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 9 Nov 2015 23:09:45 +0000 (10:09 +1100)
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 <agruenba@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_acl.c
fs/xfs/xfs_acl.h

index 763e365..6bb470f 100644 (file)
@@ -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;
        }
 
index 75af0a4..52f8255 100644 (file)
@@ -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);