mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-22 12:33:59 +08:00
nilfs2: do not allocate nilfs_mdt_info structure to gc-inodes
GC-inode now doesn't need the nilfs_mdt_info structure and there is no reason that it is a sort of metadata files. This stops the allocation and makes them not dependent on metadata file routines. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
This commit is contained in:
parent
518d1a6a1d
commit
adbb39b548
@ -168,7 +168,7 @@ int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *bh)
|
|||||||
}
|
}
|
||||||
nilfs_btnode_mark_dirty(bh);
|
nilfs_btnode_mark_dirty(bh);
|
||||||
} else {
|
} else {
|
||||||
nilfs_mdt_mark_buffer_dirty(bh);
|
nilfs_mark_buffer_dirty(bh);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -177,24 +177,24 @@ int nilfs_init_gcinode(struct inode *inode)
|
|||||||
{
|
{
|
||||||
struct nilfs_inode_info *ii = NILFS_I(inode);
|
struct nilfs_inode_info *ii = NILFS_I(inode);
|
||||||
struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs;
|
struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs;
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = nilfs_mdt_init(inode, nilfs, GFP_NOFS, 0);
|
inode->i_mode = S_IFREG;
|
||||||
if (!ret) {
|
mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
|
||||||
inode->i_mapping->a_ops = &def_gcinode_aops;
|
inode->i_mapping->a_ops = &def_gcinode_aops;
|
||||||
|
inode->i_mapping->backing_dev_info = inode->i_sb->s_bdi;
|
||||||
|
|
||||||
ii->i_flags = 0;
|
ii->i_flags = 0;
|
||||||
nilfs_bmap_init_gc(ii->i_bmap);
|
nilfs_bmap_init_gc(ii->i_bmap);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add the inode to GC inode list. Garbage Collection
|
* Add the inode to GC inode list. Garbage Collection
|
||||||
* is serialized and no two processes manipulate the
|
* is serialized and no two processes manipulate the
|
||||||
* list simultaneously.
|
* list simultaneously.
|
||||||
*/
|
*/
|
||||||
igrab(inode);
|
igrab(inode);
|
||||||
list_add(&NILFS_I(inode)->i_dirty, &nilfs->ns_gc_inodes);
|
list_add(&NILFS_I(inode)->i_dirty, &nilfs->ns_gc_inodes);
|
||||||
}
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user