Browse Source

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 <agruenba@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Andreas Gruenbacher 9 years ago
parent
commit
edfb8ebce2
2 changed files with 1 additions and 1 deletions
  1. 1 0
      fs/xfs/xfs_acl.c
  2. 0 1
      fs/xfs/xfs_acl.h

+ 1 - 0
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;
 	}
 

+ 0 - 1
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);