> +static inline bool IS_DEVDAX(struct inode *inode) > +{ > + if (!IS_ENABLED(CONFIG_DEV_DAX)) > + return false; > + if ((inode->i_flags & S_DAX) == 0) > + return false; > + if (!S_ISCHR(inode->i_mode)) > + return false; > + return true; > +} > + > +static inline bool IS_FSDAX(struct inode *inode) > +{ > + if (!IS_ENABLED(CONFIG_FS_DAX)) > + return false; > + if ((inode->i_flags & S_DAX) == 0) > + return false; > + if (S_ISCHR(inode->i_mode)) > + return false; > + return true; Encoding the is char device or not thing here is just nasty. I think this is going entirely in the wrong direction. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>