]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/reiserfs/xattr_acl.c
[PATCH] reiserfs/xattr_acl.c:reiserfs_get_acl(): make size an int
[mirror_ubuntu-artful-kernel.git] / fs / reiserfs / xattr_acl.c
index 43de3ba833327d35618cd156d12ab96d53440c41..58c418fbca2cc3e4405b194299fcb3dfaa4dbc79 100644 (file)
@@ -182,7 +182,7 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
 {
        char *name, *value;
        struct posix_acl *acl, **p_acl;
-       size_t size;
+       int size;
        int retval;
        struct reiserfs_inode_info *reiserfs_i = REISERFS_I(inode);
 
@@ -206,7 +206,7 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
                return posix_acl_dup(*p_acl);
 
        size = reiserfs_xattr_get(inode, name, NULL, 0);
-       if ((int)size < 0) {
+       if (size < 0) {
                if (size == -ENODATA || size == -ENOSYS) {
                        *p_acl = ERR_PTR(-ENODATA);
                        return NULL;
@@ -228,7 +228,8 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
                acl = ERR_PTR(retval);
        } else {
                acl = posix_acl_from_disk(value, retval);
-               *p_acl = posix_acl_dup(acl);
+               if (!IS_ERR(acl))
+                       *p_acl = posix_acl_dup(acl);
        }
 
        kfree(value);