mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-17 22:37:40 +07:00
f2fs: trigger release_dirty_inode in f2fs_put_super
The generic_shutdown_super calls sync_filesystem, evict_inode, and then f2fs_put_super. In f2fs_evict_inode, we remain some dirty inode information so we should release them at f2fs_put_super. Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
97c3c5cac2
commit
6f12ac25f0
@ -348,7 +348,7 @@ bool exist_written_data(struct f2fs_sb_info *sbi, nid_t ino, int mode)
|
|||||||
return e ? true : false;
|
return e ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void release_dirty_inode(struct f2fs_sb_info *sbi)
|
void release_dirty_inode(struct f2fs_sb_info *sbi)
|
||||||
{
|
{
|
||||||
struct ino_entry *e, *tmp;
|
struct ino_entry *e, *tmp;
|
||||||
int i;
|
int i;
|
||||||
|
@ -1262,6 +1262,7 @@ int ra_meta_pages(struct f2fs_sb_info *, int, int, int);
|
|||||||
long sync_meta_pages(struct f2fs_sb_info *, enum page_type, long);
|
long sync_meta_pages(struct f2fs_sb_info *, enum page_type, long);
|
||||||
void add_dirty_inode(struct f2fs_sb_info *, nid_t, int type);
|
void add_dirty_inode(struct f2fs_sb_info *, nid_t, int type);
|
||||||
void remove_dirty_inode(struct f2fs_sb_info *, nid_t, int type);
|
void remove_dirty_inode(struct f2fs_sb_info *, nid_t, int type);
|
||||||
|
void release_dirty_inode(struct f2fs_sb_info *);
|
||||||
bool exist_written_data(struct f2fs_sb_info *, nid_t, int);
|
bool exist_written_data(struct f2fs_sb_info *, nid_t, int);
|
||||||
int acquire_orphan_inode(struct f2fs_sb_info *);
|
int acquire_orphan_inode(struct f2fs_sb_info *);
|
||||||
void release_orphan_inode(struct f2fs_sb_info *);
|
void release_orphan_inode(struct f2fs_sb_info *);
|
||||||
|
@ -435,6 +435,9 @@ static void f2fs_put_super(struct super_block *sb)
|
|||||||
if (sbi->s_dirty)
|
if (sbi->s_dirty)
|
||||||
write_checkpoint(sbi, true);
|
write_checkpoint(sbi, true);
|
||||||
|
|
||||||
|
/* normally superblock is clean, so we need to release this */
|
||||||
|
release_dirty_inode(sbi);
|
||||||
|
|
||||||
iput(sbi->node_inode);
|
iput(sbi->node_inode);
|
||||||
iput(sbi->meta_inode);
|
iput(sbi->meta_inode);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user