Skip to content

Commit cecd491

Browse files
lostjeffleMiklos Szeredi
authored andcommitted
fuse: add fuse_should_enable_dax() helper
This is in prep for following per inode DAX checking. Signed-off-by: Jeffle Xu <[email protected]> Reviewed-by: Vivek Goyal <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent e388164 commit cecd491

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

fs/fuse/dax.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,11 +1327,19 @@ static const struct address_space_operations fuse_dax_file_aops = {
13271327
.invalidatepage = noop_invalidatepage,
13281328
};
13291329

1330-
void fuse_dax_inode_init(struct inode *inode)
1330+
static bool fuse_should_enable_dax(struct inode *inode)
13311331
{
13321332
struct fuse_conn *fc = get_fuse_conn(inode);
13331333

13341334
if (!fc->dax)
1335+
return false;
1336+
1337+
return true;
1338+
}
1339+
1340+
void fuse_dax_inode_init(struct inode *inode)
1341+
{
1342+
if (!fuse_should_enable_dax(inode))
13351343
return;
13361344

13371345
inode->i_flags |= S_DAX;

0 commit comments

Comments
 (0)