Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180326
b: refs/heads/master
c: 4b06e5b
h: refs/heads/master
v: v3
  • Loading branch information
Jun'ichi Nomura authored and Al Viro committed Feb 7, 2010
1 parent 4d4e09d commit 421d9ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 8dd5ca532c2d2c2b85f16bc038ebfff05b8853e1
refs/heads/master: 4b06e5b9ad8abb20105b2b25e42c509ebe9b2d76
7 changes: 4 additions & 3 deletions trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ struct super_block *freeze_bdev(struct block_device *bdev)
if (!sb)
goto out;
if (sb->s_flags & MS_RDONLY) {
deactivate_locked_super(sb);
sb->s_frozen = SB_FREEZE_TRANS;
up_write(&sb->s_umount);
mutex_unlock(&bdev->bd_fsfreeze_mutex);
return sb;
}
Expand Down Expand Up @@ -307,7 +308,7 @@ int thaw_bdev(struct block_device *bdev, struct super_block *sb)
BUG_ON(sb->s_bdev != bdev);
down_write(&sb->s_umount);
if (sb->s_flags & MS_RDONLY)
goto out_deactivate;
goto out_unfrozen;

if (sb->s_op->unfreeze_fs) {
error = sb->s_op->unfreeze_fs(sb);
Expand All @@ -321,11 +322,11 @@ int thaw_bdev(struct block_device *bdev, struct super_block *sb)
}
}

out_unfrozen:
sb->s_frozen = SB_UNFROZEN;
smp_wmb();
wake_up(&sb->s_wait_unfrozen);

out_deactivate:
if (sb)
deactivate_locked_super(sb);
out_unlock:
Expand Down

0 comments on commit 421d9ac

Please sign in to comment.