add patch set-ext4_dax_aops-for-dax-files
[ext4-patch-queue.git] / add-ext4_bmap-to-ext4_dax_aops
blob27c6b3b3c400c988a5c715308be2ba9ce2916e0d
1 ext4, dax: add ext4_bmap to ext4_dax_aops
3 From: Toshi Kani <toshi.kani@hpe.com>
5 Ext4 mount path calls .bmap to the journal inode. This currently
6 works for the DAX mount case because ext4_iget() always set
7 'ext4_da_aops' to any regular files.
9 In preparation to fix ext4_iget() to set 'ext4_dax_aops' for ext4
10 DAX files, add ext4_bmap() to 'ext4_dax_aops', since bmap works for
11 DAX inodes.
13 Fixes: 5f0663bb4a64 ("ext4, dax: introduce ext4_dax_aops")
14 Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
15 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 Suggested-by: Jan Kara <jack@suse.cz>
17 Cc: stable@vger.kernel.org
18 ---
19  fs/ext4/inode.c |    1 +
20  1 file changed, 1 insertion(+)
22 diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
23 index d0dd585add6a..e4acaa980467 100644
24 --- a/fs/ext4/inode.c
25 +++ b/fs/ext4/inode.c
26 @@ -3948,6 +3948,7 @@ static const struct address_space_operations ext4_dax_aops = {
27         .writepages             = ext4_dax_writepages,
28         .direct_IO              = noop_direct_IO,
29         .set_page_dirty         = noop_set_page_dirty,
30 +       .bmap                   = ext4_bmap,
31         .invalidatepage         = noop_invalidatepage,
32  };