* The INCOMPLETE flag means that we will find the "old"
                 * attr, not the "new" one.
                 */
-               args->flags |= XFS_ATTR_INCOMPLETE;
+               args->op_flags |= XFS_DA_OP_INCOMPLETE;
                state = xfs_da_state_alloc();
                state->args = args;
                state->mp = mp;
 
                 * If we are looking for INCOMPLETE entries, show only those.
                 * If we are looking for complete entries, show only those.
                 */
-               if ((args->flags & XFS_ATTR_INCOMPLETE) !=
-                   (entry->flags & XFS_ATTR_INCOMPLETE)) {
+               if (!!(args->op_flags & XFS_DA_OP_INCOMPLETE) !=
+                   !!(entry->flags & XFS_ATTR_INCOMPLETE)) {
                        continue;
                }
                if (entry->flags & XFS_ATTR_LOCAL) {
 
 #define XFS_DA_OP_OKNOENT      0x0008  /* lookup/add op, ENOENT ok, else die */
 #define XFS_DA_OP_CILOOKUP     0x0010  /* lookup to return CI name if found */
 #define XFS_DA_OP_ALLOCVAL     0x0020  /* lookup to alloc buffer if found  */
+#define XFS_DA_OP_INCOMPLETE   0x0040  /* lookup INCOMPLETE attr keys */
 
 #define XFS_DA_OP_FLAGS \
        { XFS_DA_OP_JUSTCHECK,  "JUSTCHECK" }, \
        { XFS_DA_OP_ADDNAME,    "ADDNAME" }, \
        { XFS_DA_OP_OKNOENT,    "OKNOENT" }, \
        { XFS_DA_OP_CILOOKUP,   "CILOOKUP" }, \
-       { XFS_DA_OP_ALLOCVAL,   "ALLOCVAL" }
+       { XFS_DA_OP_ALLOCVAL,   "ALLOCVAL" }, \
+       { XFS_DA_OP_INCOMPLETE, "INCOMPLETE" }
 
 /*
  * Storage for holding state during Btree searches and split/join ops.
 
 
 /*
  * Flags used in the leaf_entry[i].flags field.
- * NOTE: the INCOMPLETE bit must not collide with the flags bits specified
- * on the system call, they are "or"ed together for various operations.
  */
 #define        XFS_ATTR_LOCAL_BIT      0       /* attr is stored locally */
 #define        XFS_ATTR_ROOT_BIT       1       /* limit access to trusted attrs */