diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 1d3683d496f8..0d6ca7bac6c8 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -201,7 +201,7 @@ int fsync_bdev(struct block_device *bdev) | |||
201 | * freeze_bdev -- lock a filesystem and force it into a consistent state | 201 | * freeze_bdev -- lock a filesystem and force it into a consistent state |
202 | * @bdev: blockdevice to lock | 202 | * @bdev: blockdevice to lock |
203 | * | 203 | * |
204 | * This takes the block device bd_mount_sem to make sure no new mounts | 204 | * This takes the block device bd_mount_mutex to make sure no new mounts |
205 | * happen on bdev until thaw_bdev() is called. | 205 | * happen on bdev until thaw_bdev() is called. |
206 | * If a superblock is found on this device, we take the s_umount semaphore | 206 | * If a superblock is found on this device, we take the s_umount semaphore |
207 | * on it to make sure nobody unmounts until the snapshot creation is done. | 207 | * on it to make sure nobody unmounts until the snapshot creation is done. |
@@ -210,7 +210,7 @@ struct super_block *freeze_bdev(struct block_device *bdev) | |||
210 | { | 210 | { |
211 | struct super_block *sb; | 211 | struct super_block *sb; |
212 | 212 | ||
213 | down(&bdev->bd_mount_sem); | 213 | mutex_lock(&bdev->bd_mount_mutex); |
214 | sb = get_super(bdev); | 214 | sb = get_super(bdev); |
215 | if (sb && !(sb->s_flags & MS_RDONLY)) { | 215 | if (sb && !(sb->s_flags & MS_RDONLY)) { |
216 | sb->s_frozen = SB_FREEZE_WRITE; | 216 | sb->s_frozen = SB_FREEZE_WRITE; |
@@ -264,7 +264,7 @@ void thaw_bdev(struct block_device *bdev, struct super_block *sb) | |||
264 | drop_super(sb); | 264 | drop_super(sb); |
265 | } | 265 | } |
266 | 266 | ||
267 | up(&bdev->bd_mount_sem); | 267 | mutex_unlock(&bdev->bd_mount_mutex); |
268 | } | 268 | } |
269 | EXPORT_SYMBOL(thaw_bdev); | 269 | EXPORT_SYMBOL(thaw_bdev); |
270 | 270 | ||