forked from Minki/linux
fuse: add fuse_should_enable_dax() helper
This is in prep for following per inode DAX checking. Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com> Reviewed-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
e388164ea3
commit
cecd491641
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user