diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2016-05-24 01:23:20 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-24 02:04:14 +0200 |
commit | 2d19961d83524c69e44f179b43aee2daf0906eda (patch) | |
tree | bd65c4e61733de1fc2077fead93958c7388b0c74 /fs/nilfs2/mdt.h | |
parent | nilfs2: get rid of nilfs_mdt_mark_block_dirty() (diff) | |
download | linux-2d19961d83524c69e44f179b43aee2daf0906eda.tar.xz linux-2d19961d83524c69e44f179b43aee2daf0906eda.zip |
nilfs2: move cleanup code of metadata file from inode routines
Refactor nilfs_clear_inode() and nilfs_i_callback() so that cleanup
code or resource deallocation related to metadata file will be moved
out to mdt.c.
Link: http://lkml.kernel.org/r/1461935747-10380-9-git-send-email-konishi.ryusuke@lab.ntt.co.jp
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/mdt.h')
-rw-r--r-- | fs/nilfs2/mdt.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nilfs2/mdt.h b/fs/nilfs2/mdt.h index dc88907508cd..ffb876e6efed 100644 --- a/fs/nilfs2/mdt.h +++ b/fs/nilfs2/mdt.h @@ -67,6 +67,11 @@ static inline struct nilfs_mdt_info *NILFS_MDT(const struct inode *inode) return inode->i_private; } +static inline int nilfs_is_metadata_file_inode(const struct inode *inode) +{ + return inode->i_private != NULL; +} + /* Default GFP flags using highmem */ #define NILFS_MDT_GFP (__GFP_RECLAIM | __GFP_IO | __GFP_HIGHMEM) @@ -82,6 +87,9 @@ int nilfs_mdt_forget_block(struct inode *, unsigned long); int nilfs_mdt_fetch_dirty(struct inode *); int nilfs_mdt_init(struct inode *inode, gfp_t gfp_mask, size_t objsz); +void nilfs_mdt_clear(struct inode *inode); +void nilfs_mdt_destroy(struct inode *inode); + void nilfs_mdt_set_entry_size(struct inode *, unsigned, unsigned); int nilfs_mdt_setup_shadow_map(struct inode *inode, |