code: public T updateMask(List<AclEntry> entries) {
      boolean needToUpdateACL = false;
      boolean needToUpdateDefaultACL = false;
  
      for (AclEntry entry : entries) {
        if (entry.getType().equals(AclEntryType.NAMED_USER)
            || entry.getType().equals(AclEntryType.NAMED_GROUP)
            || entry.getType().equals(AclEntryType.OWNING_GROUP)) {
          if (entry.isDefault()) {
            needToUpdateDefaultACL = true;
          } else {
            needToUpdateACL = true;
          }
        }
        if (entry.getType().equals(AclEntryType.MASK)) {
          // If mask is explicitly set or removed then we don't need to update the mask
          return getThis();
        }
      }
      if (needToUpdateACL) {
        mAcl.updateMask();
      }
  
      if (needToUpdateDefaultACL) {
        getDefaultACL().updateMask();
      }
      return getThis();
    }
docs: Update Mask for the Inode.
  This method should be called after updates to ACL and defaultACL.
  
  @param entries the list of ACL entries
  @return the updated object