Whamcloud - gitweb
LU-3097 build: fix 'no effect' errors
[fs/lustre-release.git] / lustre / llite / xattr.c
index 67ab229..c6b9cfb 100644 (file)
@@ -402,21 +402,20 @@ do_getxattr:
        }
 
 #ifdef CONFIG_FS_POSIX_ACL
-       if (rce && rce->rce_ops == RMT_LSETFACL) {
+       if (rce != NULL && rce->rce_ops == RMT_LSETFACL) {
                ext_acl_xattr_header *acl;
 
-               acl = lustre_posix_acl_xattr_2ext((posix_acl_xattr_header *)buffer,
-                                               rc);
-                if (IS_ERR(acl))
-                        GOTO(out, rc = PTR_ERR(acl));
+               acl = lustre_posix_acl_xattr_2ext(buffer, rc);
+               if (IS_ERR(acl))
+                       GOTO(out, rc = PTR_ERR(acl));
 
                rc = ee_add(&sbi->ll_et, current_pid(), ll_inode2fid(inode),
                            xattr_type, acl);
-                if (unlikely(rc < 0)) {
-                        lustre_ext_acl_xattr_free(acl);
-                        GOTO(out, rc);
-                }
-        }
+               if (unlikely(rc < 0)) {
+                       lustre_ext_acl_xattr_free(acl);
+                       GOTO(out, rc);
+               }
+       }
 #endif
        EXIT;