From 93204787ad34ed8abf31892cbd1d2fe8dbff159e Mon Sep 17 00:00:00 2001 From: Ryusuke Konishi Date: Sun, 31 Jan 2010 19:46:40 +0900 Subject: [PATCH] --- yaml --- r: 185471 b: refs/heads/master c: fe5f171bb272946ce5fbf843ce2f8467d0d41b9a h: refs/heads/master i: 185469: bf190883d5dd36c5065325268e08d161694f732c 185467: 53351954d159efcb74134833b0c785fbba63d3ae 185463: b4d98edd5cce30360bef7d191afdfa98b3bf28fa 185455: 427251c68c16b898d4ddf79ba138102216dd5ab1 185439: a227f588b7e78640c6013d4231deaddcb3dcce69 185407: 463f9b27e40961124e1b563ffc0ec75a562f2a26 185343: a57c266fd43afe1becee8f26cd1aeadee4a34254 v: v3 --- [refs] | 2 +- trunk/fs/nilfs2/segment.c | 11 +++++++++-- trunk/fs/nilfs2/super.c | 3 --- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index bd4ef162141c..de9a3f16f683 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7512487e6d6459e4c3f9c7cedc53050a6c30e387 +refs/heads/master: fe5f171bb272946ce5fbf843ce2f8467d0d41b9a diff --git a/trunk/fs/nilfs2/segment.c b/trunk/fs/nilfs2/segment.c index 9280b0f10792..ab439a7ef2d8 100644 --- a/trunk/fs/nilfs2/segment.c +++ b/trunk/fs/nilfs2/segment.c @@ -2875,8 +2875,15 @@ int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi) struct the_nilfs *nilfs = sbi->s_nilfs; int err; - /* Each field of nilfs_segctor is cleared through the initialization - of super-block info */ + if (NILFS_SC(sbi)) { + /* + * This happens if the filesystem was remounted + * read/write after nilfs_error degenerated it into a + * read-only mount. + */ + nilfs_detach_segment_constructor(sbi); + } + sbi->s_sc_info = nilfs_segctor_new(sbi); if (!sbi->s_sc_info) return -ENOMEM; diff --git a/trunk/fs/nilfs2/super.c b/trunk/fs/nilfs2/super.c index 3f88401a375b..f068270f6c75 100644 --- a/trunk/fs/nilfs2/super.c +++ b/trunk/fs/nilfs2/super.c @@ -96,9 +96,6 @@ void nilfs_error(struct super_block *sb, const char *function, if (!(sb->s_flags & MS_RDONLY)) { struct the_nilfs *nilfs = sbi->s_nilfs; - if (!nilfs_test_opt(sbi, ERRORS_CONT)) - nilfs_detach_segment_constructor(sbi); - down_write(&nilfs->ns_sem); if (!(nilfs->ns_mount_state & NILFS_ERROR_FS)) { nilfs->ns_mount_state |= NILFS_ERROR_FS;