Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174715
b: refs/heads/master
c: a057d2c
h: refs/heads/master
i:
  174713: 010cf7a
  174711: 22c6bd8
v: v3
  • Loading branch information
Ryusuke Konishi committed Nov 20, 2009
1 parent 1e7251a commit 4aac978
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f50a4c8149cc135921a8a0476bff8e622f59aef9
refs/heads/master: a057d2c01161444c48b12a60351ae6c7135f6e61
6 changes: 1 addition & 5 deletions trunk/fs/nilfs2/the_nilfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,12 @@ int load_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
struct nilfs_recovery_info ri;
unsigned int s_flags = sbi->s_super->s_flags;
int really_read_only = bdev_read_only(nilfs->ns_bdev);
unsigned valid_fs;
int valid_fs = nilfs_valid_fs(nilfs);
int err;

if (nilfs_loaded(nilfs))
return 0;

down_write(&nilfs->ns_sem);
valid_fs = (nilfs->ns_mount_state & NILFS_VALID_FS);
up_write(&nilfs->ns_sem);

if (!valid_fs) {
printk(KERN_WARNING "NILFS warning: mounting unchecked fs\n");
if (s_flags & MS_RDONLY) {
Expand Down
10 changes: 10 additions & 0 deletions trunk/fs/nilfs2/the_nilfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,16 @@ static inline void nilfs_put_sbinfo(struct nilfs_sb_info *sbi)
kfree(sbi);
}

static inline int nilfs_valid_fs(struct the_nilfs *nilfs)
{
unsigned valid_fs;

down_read(&nilfs->ns_sem);
valid_fs = (nilfs->ns_mount_state & NILFS_VALID_FS);
up_read(&nilfs->ns_sem);
return valid_fs;
}

static inline void
nilfs_get_segment_range(struct the_nilfs *nilfs, __u64 segnum,
sector_t *seg_start, sector_t *seg_end)
Expand Down

0 comments on commit 4aac978

Please sign in to comment.