diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-09-04 11:23:50 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-10-22 20:24:38 -0400 |
commit | c6e071884aca360a14c21757d760e76ec34b4894 (patch) | |
tree | 341d4130f06f1063bd63ed8a8cdb3f602848ff17 /fs/nilfs2/mdt.h | |
parent | 032dbb3b503a30fce732ec4c05525d0abed1f1d6 (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.h')
-rw-r--r-- | fs/nilfs2/mdt.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/nilfs2/mdt.h b/fs/nilfs2/mdt.h index 73ff7c055715..76356d2899ed 100644 --- a/fs/nilfs2/mdt.h +++ b/fs/nilfs2/mdt.h | |||
@@ -37,7 +37,6 @@ struct nilfs_shadow_map { | |||
37 | 37 | ||
38 | /** | 38 | /** |
39 | * struct nilfs_mdt_info - on-memory private data of meta data files | 39 | * struct nilfs_mdt_info - on-memory private data of meta data files |
40 | * @mi_nilfs: back pointer to the_nilfs struct | ||
41 | * @mi_sem: reader/writer semaphore for meta data operations | 40 | * @mi_sem: reader/writer semaphore for meta data operations |
42 | * @mi_bgl: per-blockgroup locking | 41 | * @mi_bgl: per-blockgroup locking |
43 | * @mi_entry_size: size of an entry | 42 | * @mi_entry_size: size of an entry |
@@ -49,7 +48,6 @@ struct nilfs_shadow_map { | |||
49 | * @mi_blocks_per_desc_block: number of blocks per descriptor block | 48 | * @mi_blocks_per_desc_block: number of blocks per descriptor block |
50 | */ | 49 | */ |
51 | struct nilfs_mdt_info { | 50 | struct nilfs_mdt_info { |
52 | struct the_nilfs *mi_nilfs; | ||
53 | struct rw_semaphore mi_sem; | 51 | struct rw_semaphore mi_sem; |
54 | struct blockgroup_lock *mi_bgl; | 52 | struct blockgroup_lock *mi_bgl; |
55 | unsigned mi_entry_size; | 53 | unsigned mi_entry_size; |
@@ -68,9 +66,7 @@ static inline struct nilfs_mdt_info *NILFS_MDT(const struct inode *inode) | |||
68 | 66 | ||
69 | static inline struct the_nilfs *NILFS_I_NILFS(struct inode *inode) | 67 | static inline struct the_nilfs *NILFS_I_NILFS(struct inode *inode) |
70 | { | 68 | { |
71 | struct super_block *sb = inode->i_sb; | 69 | return NILFS_SB(inode->i_sb)->s_nilfs; |
72 | |||
73 | return sb ? NILFS_SB(sb)->s_nilfs : NILFS_MDT(inode)->mi_nilfs; | ||
74 | } | 70 | } |
75 | 71 | ||
76 | /* Default GFP flags using highmem */ | 72 | /* Default GFP flags using highmem */ |
@@ -117,7 +113,7 @@ static inline void nilfs_mdt_clear_dirty(struct inode *inode) | |||
117 | 113 | ||
118 | static inline __u64 nilfs_mdt_cno(struct inode *inode) | 114 | static inline __u64 nilfs_mdt_cno(struct inode *inode) |
119 | { | 115 | { |
120 | return NILFS_MDT(inode)->mi_nilfs->ns_cno; | 116 | return NILFS_I_NILFS(inode)->ns_cno; |
121 | } | 117 | } |
122 | 118 | ||
123 | #define nilfs_mdt_bgl_lock(inode, bg) \ | 119 | #define nilfs_mdt_bgl_lock(inode, bg) \ |