aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/mdt.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-09-04 11:23:50 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-10-22 20:24:38 -0400
commitc6e071884aca360a14c21757d760e76ec34b4894 (patch)
tree341d4130f06f1063bd63ed8a8cdb3f602848ff17 /fs/nilfs2/mdt.c
parent032dbb3b503a30fce732ec4c05525d0abed1f1d6 (diff)
nilfs2: get rid of mi_nilfs back pointer to nilfs object
This removes a back pointer to nilfs object from nilfs_mdt_info structure that is attached to metadata files. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/mdt.c')
-rw-r--r--fs/nilfs2/mdt.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c
index 44326cfe1fa9..32695f3c4b9a 100644
--- a/fs/nilfs2/mdt.c
+++ b/fs/nilfs2/mdt.c
@@ -78,7 +78,7 @@ static int nilfs_mdt_create_block(struct inode *inode, unsigned long block,
78 struct buffer_head *, 78 struct buffer_head *,
79 void *)) 79 void *))
80{ 80{
81 struct the_nilfs *nilfs = NILFS_MDT(inode)->mi_nilfs; 81 struct the_nilfs *nilfs = NILFS_I_NILFS(inode);
82 struct super_block *sb = inode->i_sb; 82 struct super_block *sb = inode->i_sb;
83 struct nilfs_transaction_info ti; 83 struct nilfs_transaction_info ti;
84 struct buffer_head *bh; 84 struct buffer_head *bh;
@@ -167,9 +167,7 @@ nilfs_mdt_submit_block(struct inode *inode, unsigned long blkoff,
167 unlock_buffer(bh); 167 unlock_buffer(bh);
168 goto failed_bh; 168 goto failed_bh;
169 } 169 }
170 bh->b_bdev = NILFS_MDT(inode)->mi_nilfs->ns_bdev; 170 map_bh(bh, inode->i_sb, (sector_t)blknum);
171 bh->b_blocknr = (sector_t)blknum;
172 set_buffer_mapped(bh);
173 171
174 bh->b_end_io = end_buffer_read_sync; 172 bh->b_end_io = end_buffer_read_sync;
175 get_bh(bh); 173 get_bh(bh);
@@ -412,7 +410,7 @@ nilfs_mdt_write_page(struct page *page, struct writeback_control *wbc)
412 return 0; 410 return 0;
413 411
414 sb = inode->i_sb; 412 sb = inode->i_sb;
415 nilfs = NILFS_MDT(inode)->mi_nilfs; 413 nilfs = NILFS_SB(sb)->s_nilfs;
416 414
417 if (!sb) { 415 if (!sb) {
418 down_read(&nilfs->ns_writer_sem); 416 down_read(&nilfs->ns_writer_sem);
@@ -452,7 +450,6 @@ int nilfs_mdt_init(struct inode *inode, gfp_t gfp_mask, size_t objsz)
452 if (!mi) 450 if (!mi)
453 return -ENOMEM; 451 return -ENOMEM;
454 452
455 mi->mi_nilfs = NILFS_I_NILFS(inode);
456 init_rwsem(&mi->mi_sem); 453 init_rwsem(&mi->mi_sem);
457 inode->i_private = mi; 454 inode->i_private = mi;
458 455