diff options
Diffstat (limited to 'fs/nilfs2/the_nilfs.h')
-rw-r--r-- | fs/nilfs2/the_nilfs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nilfs2/the_nilfs.h b/fs/nilfs2/the_nilfs.h index 20abd55881e0..589786e33464 100644 --- a/fs/nilfs2/the_nilfs.h +++ b/fs/nilfs2/the_nilfs.h | |||
@@ -258,6 +258,16 @@ static inline void nilfs_put_sbinfo(struct nilfs_sb_info *sbi) | |||
258 | kfree(sbi); | 258 | kfree(sbi); |
259 | } | 259 | } |
260 | 260 | ||
261 | static inline int nilfs_valid_fs(struct the_nilfs *nilfs) | ||
262 | { | ||
263 | unsigned valid_fs; | ||
264 | |||
265 | down_read(&nilfs->ns_sem); | ||
266 | valid_fs = (nilfs->ns_mount_state & NILFS_VALID_FS); | ||
267 | up_read(&nilfs->ns_sem); | ||
268 | return valid_fs; | ||
269 | } | ||
270 | |||
261 | static inline void | 271 | static inline void |
262 | nilfs_get_segment_range(struct the_nilfs *nilfs, __u64 segnum, | 272 | nilfs_get_segment_range(struct the_nilfs *nilfs, __u64 segnum, |
263 | sector_t *seg_start, sector_t *seg_end) | 273 | sector_t *seg_start, sector_t *seg_end) |