Commit 7d6cd92f authored by Ryusuke Konishi's avatar Ryusuke Konishi

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: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
parent b91c9a97
...@@ -808,6 +808,7 @@ int nilfs_mark_inode_dirty(struct inode *inode) ...@@ -808,6 +808,7 @@ int nilfs_mark_inode_dirty(struct inode *inode)
void nilfs_dirty_inode(struct inode *inode) void nilfs_dirty_inode(struct inode *inode)
{ {
struct nilfs_transaction_info ti; struct nilfs_transaction_info ti;
struct nilfs_mdt_info *mdi = NILFS_MDT(inode);
if (is_bad_inode(inode)) { if (is_bad_inode(inode)) {
nilfs_warning(inode->i_sb, __func__, nilfs_warning(inode->i_sb, __func__,
...@@ -815,6 +816,10 @@ void nilfs_dirty_inode(struct inode *inode) ...@@ -815,6 +816,10 @@ void nilfs_dirty_inode(struct inode *inode)
dump_stack(); dump_stack();
return; return;
} }
if (mdi) {
nilfs_mdt_mark_dirty(inode);
return;
}
nilfs_transaction_begin(inode->i_sb, &ti, 0); nilfs_transaction_begin(inode->i_sb, &ti, 0);
nilfs_mark_inode_dirty(inode); nilfs_mark_inode_dirty(inode);
nilfs_transaction_commit(inode->i_sb); /* never fails */ nilfs_transaction_commit(inode->i_sb); /* never fails */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment