Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206337
b: refs/heads/master
c: c8a11c8
h: refs/heads/master
i:
  206335: 441ebf9
v: v3
  • Loading branch information
Ryusuke Konishi committed Jul 23, 2010
1 parent 861c9c5 commit 09262f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 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: 7ecaa46cfea453238a369b3019739d50ff5d7c37
refs/heads/master: c8a11c8a1455c380286cfd3d3442e2b60edee49a
24 changes: 14 additions & 10 deletions trunk/fs/nilfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ struct kmem_cache *nilfs_btree_path_cache;

static int nilfs_remount(struct super_block *sb, int *flags, char *data);

static void nilfs_set_error(struct nilfs_sb_info *sbi)
{
struct the_nilfs *nilfs = sbi->s_nilfs;

down_write(&nilfs->ns_sem);
if (!(nilfs->ns_mount_state & NILFS_ERROR_FS)) {
nilfs->ns_mount_state |= NILFS_ERROR_FS;
nilfs->ns_sbp[0]->s_state |= cpu_to_le16(NILFS_ERROR_FS);
nilfs_commit_super(sbi, 1);
}
up_write(&nilfs->ns_sem);
}

/**
* nilfs_error() - report failure condition on a filesystem
*
Expand All @@ -99,16 +112,7 @@ void nilfs_error(struct super_block *sb, const char *function,
va_end(args);

if (!(sb->s_flags & MS_RDONLY)) {
struct the_nilfs *nilfs = sbi->s_nilfs;

down_write(&nilfs->ns_sem);
if (!(nilfs->ns_mount_state & NILFS_ERROR_FS)) {
nilfs->ns_mount_state |= NILFS_ERROR_FS;
nilfs->ns_sbp[0]->s_state |=
cpu_to_le16(NILFS_ERROR_FS);
nilfs_commit_super(sbi, 1);
}
up_write(&nilfs->ns_sem);
nilfs_set_error(sbi);

if (nilfs_test_opt(sbi, ERRORS_RO)) {
printk(KERN_CRIT "Remounting filesystem read-only\n");
Expand Down

0 comments on commit 09262f9

Please sign in to comment.