Skip to content

Commit 7d6cd92

Browse files
committed
nilfs2: allow nilfs_dirty_inode to mark metadata file inodes dirty
This allows sop->dirty_inode callback function (nilfs_dirty_inode) to handle metadata file inodes. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
1 parent b91c9a9 commit 7d6cd92

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎fs/nilfs2/inode.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,13 +808,18 @@ int nilfs_mark_inode_dirty(struct inode *inode)
808808
void nilfs_dirty_inode(struct inode *inode)
809809
{
810810
struct nilfs_transaction_info ti;
811+
struct nilfs_mdt_info *mdi = NILFS_MDT(inode);
811812

812813
if (is_bad_inode(inode)) {
813814
nilfs_warning(inode->i_sb, __func__,
814815
"tried to mark bad_inode dirty. ignored.\n");
815816
dump_stack();
816817
return;
817818
}
819+
if (mdi) {
820+
nilfs_mdt_mark_dirty(inode);
821+
return;
822+
}
818823
nilfs_transaction_begin(inode->i_sb, &ti, 0);
819824
nilfs_mark_inode_dirty(inode);
820825
nilfs_transaction_commit(inode->i_sb); /* never fails */

0 commit comments

Comments
 (0)