aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jfs/super.c')
-rw-r--r--fs/jfs/super.c38
1 files changed, 30 insertions, 8 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 2003e830ed1c..788e0a9c1fb0 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -611,11 +611,28 @@ static int jfs_freeze(struct super_block *sb)
611{ 611{
612 struct jfs_sb_info *sbi = JFS_SBI(sb); 612 struct jfs_sb_info *sbi = JFS_SBI(sb);
613 struct jfs_log *log = sbi->log; 613 struct jfs_log *log = sbi->log;
614 int rc = 0;
614 615
615 if (!(sb->s_flags & MS_RDONLY)) { 616 if (!(sb->s_flags & MS_RDONLY)) {
616 txQuiesce(sb); 617 txQuiesce(sb);
617 lmLogShutdown(log); 618 rc = lmLogShutdown(log);
618 updateSuper(sb, FM_CLEAN); 619 if (rc) {
620 jfs_error(sb, "jfs_freeze: lmLogShutdown failed");
621
622 /* let operations fail rather than hang */
623 txResume(sb);
624
625 return rc;
626 }
627 rc = updateSuper(sb, FM_CLEAN);
628 if (rc) {
629 jfs_err("jfs_freeze: updateSuper failed\n");
630 /*
631 * Don't fail here. Everything succeeded except
632 * marking the superblock clean, so there's really
633 * no harm in leaving it frozen for now.
634 */
635 }
619 } 636 }
620 return 0; 637 return 0;
621} 638}
@@ -627,13 +644,18 @@ static int jfs_unfreeze(struct super_block *sb)
627 int rc = 0; 644 int rc = 0;
628 645
629 if (!(sb->s_flags & MS_RDONLY)) { 646 if (!(sb->s_flags & MS_RDONLY)) {
630 updateSuper(sb, FM_MOUNT); 647 rc = updateSuper(sb, FM_MOUNT);
631 if ((rc = lmLogInit(log))) 648 if (rc) {
632 jfs_err("jfs_unlock failed with return code %d", rc); 649 jfs_error(sb, "jfs_unfreeze: updateSuper failed");
633 else 650 goto out;
634 txResume(sb); 651 }
652 rc = lmLogInit(log);
653 if (rc)
654 jfs_error(sb, "jfs_unfreeze: lmLogInit failed");
655out:
656 txResume(sb);
635 } 657 }
636 return 0; 658 return rc;
637} 659}
638 660
639static struct dentry *jfs_do_mount(struct file_system_type *fs_type, 661static struct dentry *jfs_do_mount(struct file_system_type *fs_type,