diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-08-20 11:30:39 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-10-22 20:24:33 -0400 |
commit | 7d6cd92fe2de3c286b8e95f43223f09db9302635 (patch) | |
tree | 24aded0ed7e0cd73c6930209a2d47df42b775d73 /fs/nilfs2 | |
parent | b91c9a97c9333c87fe2a0c94b3b22b24df1c5fc2 (diff) |
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>
Diffstat (limited to 'fs/nilfs2')
-rw-r--r-- | fs/nilfs2/inode.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index eccb2f2e2315..f1750caa362c 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -808,6 +808,7 @@ int nilfs_mark_inode_dirty(struct inode *inode) | |||
808 | void nilfs_dirty_inode(struct inode *inode) | 808 | void nilfs_dirty_inode(struct inode *inode) |
809 | { | 809 | { |
810 | struct nilfs_transaction_info ti; | 810 | struct nilfs_transaction_info ti; |
811 | struct nilfs_mdt_info *mdi = NILFS_MDT(inode); | ||
811 | 812 | ||
812 | if (is_bad_inode(inode)) { | 813 | if (is_bad_inode(inode)) { |
813 | nilfs_warning(inode->i_sb, __func__, | 814 | nilfs_warning(inode->i_sb, __func__, |
@@ -815,6 +816,10 @@ void nilfs_dirty_inode(struct inode *inode) | |||
815 | dump_stack(); | 816 | dump_stack(); |
816 | return; | 817 | return; |
817 | } | 818 | } |
819 | if (mdi) { | ||
820 | nilfs_mdt_mark_dirty(inode); | ||
821 | return; | ||
822 | } | ||
818 | nilfs_transaction_begin(inode->i_sb, &ti, 0); | 823 | nilfs_transaction_begin(inode->i_sb, &ti, 0); |
819 | nilfs_mark_inode_dirty(inode); | 824 | nilfs_mark_inode_dirty(inode); |
820 | nilfs_transaction_commit(inode->i_sb); /* never fails */ | 825 | nilfs_transaction_commit(inode->i_sb); /* never fails */ |