]> git.ipfire.org Git - people/ms/linux.git/commitdiff
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 763e36560681f5356113768d1df5a9ebf8e02cd6..6bb470fbb8e8ff3567abfb23b774607c7eab2dda 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 75af0a4d9028abb1735b410abd2e73f2c9725044..52f8255d6bdfe0c511bd9d29fb76b89a5b05efdf 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);