Skip to contentSkip to conversation

xfs: Fix error path in xfs_get_acl

PATCH New Andreas Gruenbacher 1 participant 1 message Nov 3, 2015 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: Fix error path in xfs_get_acl

Here is another bugfix patch, previously discussed here:

http://oss.sgi.com/archives/xfs/2015-10/msg00295.html

Thanks,
Andreas

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.

---
 fs/xfs/xfs_acl.c | 1 +
 fs/xfs/xfs_acl.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_acl.c +1 -0
index 763e365..6bb470f 100644
@@ -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;
 	}
 
fs/xfs/xfs_acl.h +0 -1
index 75af0a4..52f8255 100644
@@ -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);
Signature · 6 lines
2.5.0

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs