aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 263f88e4dffb..3b116078b4c3 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -180,7 +180,7 @@ int fsync_bdev(struct block_device *bdev)
180 * freeze_bdev -- lock a filesystem and force it into a consistent state 180 * freeze_bdev -- lock a filesystem and force it into a consistent state
181 * @bdev: blockdevice to lock 181 * @bdev: blockdevice to lock
182 * 182 *
183 * This takes the block device bd_mount_mutex to make sure no new mounts 183 * This takes the block device bd_mount_sem to make sure no new mounts
184 * happen on bdev until thaw_bdev() is called. 184 * happen on bdev until thaw_bdev() is called.
185 * If a superblock is found on this device, we take the s_umount semaphore 185 * If a superblock is found on this device, we take the s_umount semaphore
186 * on it to make sure nobody unmounts until the snapshot creation is done. 186 * on it to make sure nobody unmounts until the snapshot creation is done.
@@ -189,7 +189,7 @@ struct super_block *freeze_bdev(struct block_device *bdev)
189{ 189{
190 struct super_block *sb; 190 struct super_block *sb;
191 191
192 mutex_lock(&bdev->bd_mount_mutex); 192 down(&bdev->bd_mount_sem);
193 sb = get_super(bdev); 193 sb = get_super(bdev);
194 if (sb && !(sb->s_flags & MS_RDONLY)) { 194 if (sb && !(sb->s_flags & MS_RDONLY)) {
195 sb->s_frozen = SB_FREEZE_WRITE; 195 sb->s_frozen = SB_FREEZE_WRITE;
@@ -231,7 +231,7 @@ void thaw_bdev(struct block_device *bdev, struct super_block *sb)
231 drop_super(sb); 231 drop_super(sb);
232 } 232 }
233 233
234 mutex_unlock(&bdev->bd_mount_mutex); 234 up(&bdev->bd_mount_sem);
235} 235}
236EXPORT_SYMBOL(thaw_bdev); 236EXPORT_SYMBOL(thaw_bdev);
237 237