xfs
[Top] [All Lists]

[PATCH] xfs: Fix error path in xfs_get_acl

To: Dave Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Subject: [PATCH] xfs: Fix error path in xfs_get_acl
From: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
Date: Tue, 3 Nov 2015 14:47:57 +0100
Cc: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
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.

Signed-off-by: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
---
 fs/xfs/xfs_acl.c | 1 +
 fs/xfs/xfs_acl.h | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index 763e365..6bb470f 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 75af0a4..52f8255 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);
-- 
2.5.0

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] xfs: Fix error path in xfs_get_acl, Andreas Gruenbacher <=