diff options
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dax.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c index 713818d74de6..8057fbf5576c 100644 --- a/fs/fuse/dax.c +++ b/fs/fuse/dax.c @@ -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; |