jfs_umount.c (c1f3ee120bb61045b1c0a3ead620d1d65af47130) jfs_umount.c (1c8007b0769d37aa5fcb343b383b0af89ade2f71)
1/*
2 * Copyright (C) International Business Machines Corp., 2000-2004
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 54 unchanged lines hidden (view full) ---

63 * update superblock and close log
64 *
65 * if mounted read-write and log based recovery was enabled
66 */
67 if ((log = sbi->log))
68 /*
69 * Wait for outstanding transactions to be written to log:
70 */
1/*
2 * Copyright (C) International Business Machines Corp., 2000-2004
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 54 unchanged lines hidden (view full) ---

63 * update superblock and close log
64 *
65 * if mounted read-write and log based recovery was enabled
66 */
67 if ((log = sbi->log))
68 /*
69 * Wait for outstanding transactions to be written to log:
70 */
71 jfs_flush_journal(log, 1);
71 jfs_flush_journal(log, 2);
72
73 /*
74 * close fileset inode allocation map (aka fileset inode)
75 */
76 diUnmount(ipimap, 0);
77
78 diFreeSpecial(ipimap);
79 sbi->ipimap = NULL;

--- 61 unchanged lines hidden (view full) ---

141 if (!log)
142 return 0;
143
144 /*
145 * close log:
146 *
147 * remove file system from log active file system list.
148 */
72
73 /*
74 * close fileset inode allocation map (aka fileset inode)
75 */
76 diUnmount(ipimap, 0);
77
78 diFreeSpecial(ipimap);
79 sbi->ipimap = NULL;

--- 61 unchanged lines hidden (view full) ---

141 if (!log)
142 return 0;
143
144 /*
145 * close log:
146 *
147 * remove file system from log active file system list.
148 */
149 jfs_flush_journal(log, 1);
149 jfs_flush_journal(log, 2);
150
151 /*
152 * Make sure all metadata makes it to disk
153 */
154 dbSync(sbi->ipbmap);
155 diSync(sbi->ipimap);
156
157 /*
158 * Note that we have to do this even if sync_blockdev() will
159 * do exactly the same a few instructions later: We can't
160 * mark the superblock clean before everything is flushed to
161 * disk.
162 */
163 filemap_write_and_wait(sbi->direct_inode->i_mapping);
164
165 updateSuper(sb, FM_CLEAN);
166
167 return lmLogClose(sb);
168}
150
151 /*
152 * Make sure all metadata makes it to disk
153 */
154 dbSync(sbi->ipbmap);
155 diSync(sbi->ipimap);
156
157 /*
158 * Note that we have to do this even if sync_blockdev() will
159 * do exactly the same a few instructions later: We can't
160 * mark the superblock clean before everything is flushed to
161 * disk.
162 */
163 filemap_write_and_wait(sbi->direct_inode->i_mapping);
164
165 updateSuper(sb, FM_CLEAN);
166
167 return lmLogClose(sb);
168}