Commit cecd4916 authored by Jeffle Xu's avatar Jeffle Xu Committed by Miklos Szeredi

fuse: add fuse_should_enable_dax() helper

This is in prep for following per inode DAX checking.
Signed-off-by: default avatarJeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: default avatarVivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent e388164e
......@@ -1327,11 +1327,19 @@ static const struct address_space_operations fuse_dax_file_aops = {
.invalidatepage = noop_invalidatepage,
};
void fuse_dax_inode_init(struct inode *inode)
static bool fuse_should_enable_dax(struct inode *inode)
{
struct fuse_conn *fc = get_fuse_conn(inode);
if (!fc->dax)
return false;
return true;
}
void fuse_dax_inode_init(struct inode *inode)
{
if (!fuse_should_enable_dax(inode))
return;
inode->i_flags |= S_DAX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment