[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180302225316.GC31240@lst.de>
Date: Fri, 2 Mar 2018 23:53:16 +0100
From: Christoph Hellwig <hch@....de>
To: Dan Williams <dan.j.williams@...el.com>
Cc: linux-nvdimm@...ts.01.org, Theodore Ts'o <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Alexander Viro <viro@...iv.linux.org.uk>,
"Darrick J. Wong" <darrick.wong@...cle.com>,
linux-xfs@...r.kernel.org, Matthew Wilcox <mawilcox@...rosoft.com>,
Ross Zwisler <ross.zwisler@...ux.intel.com>,
stable@...r.kernel.org, Jan Kara <jack@...e.cz>, hch@....de,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 02/12] dax: introduce IS_DEVDAX() and IS_FSDAX()
> +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.
Powered by blists - more mailing lists