Whamcloud - gitweb
b=3119
[fs/lustre-release.git] / lustre / kernel_patches / patches / ext3-unmount_sync.patch
1  fs/ext3/super.c |    7 ++++++-
2  1 files changed, 6 insertions(+), 1 deletion(-)
3
4 --- linux-2.4.20/fs/ext3/super.c~ext3-unmount_sync      2003-04-08 23:35:44.000000000 -0600
5 +++ linux-2.4.20-braam/fs/ext3/super.c  2003-04-08 23:35:44.000000000 -0600
6 @@ -1612,7 +1612,12 @@ void ext3_write_super (struct super_bloc
7         sb->s_dirt = 0;
8         target = log_start_commit(EXT3_SB(sb)->s_journal, NULL);
9  
10 -       if (do_sync_supers) {
11 +       /*
12 +        * Tricky --- if we are unmounting, the write really does need
13 +        * to be synchronous.  We can detect that by looking for NULL in
14 +        * sb->s_root.
15 +        */
16 +       if (do_sync_supers || !sb->s_root) {
17                 unlock_super(sb);
18                 log_wait_commit(EXT3_SB(sb)->s_journal, target);
19                 lock_super(sb);
20
21 _