Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45481
b: refs/heads/master
c: f73ca1b
h: refs/heads/master
i:
  45479: 5978d0f
v: v3
  • Loading branch information
David Chinner authored and Linus Torvalds committed Jan 12, 2007
1 parent 2ee216f commit 5d556ec
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 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: 88bf7b391dca840f03fe25e4ff8fe6b4319fa07b
refs/heads/master: f73ca1b76c6880b934d3ef566c1592efc80bb759
2 changes: 1 addition & 1 deletion trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
{
memset(bdev, 0, sizeof(*bdev));
mutex_init(&bdev->bd_mutex);
mutex_init(&bdev->bd_mount_mutex);
sema_init(&bdev->bd_mount_sem, 1);
INIT_LIST_HEAD(&bdev->bd_inodes);
INIT_LIST_HEAD(&bdev->bd_list);
#ifdef CONFIG_SYSFS
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ int fsync_bdev(struct block_device *bdev)
* freeze_bdev -- lock a filesystem and force it into a consistent state
* @bdev: blockdevice to lock
*
* This takes the block device bd_mount_mutex to make sure no new mounts
* This takes the block device bd_mount_sem to make sure no new mounts
* happen on bdev until thaw_bdev() is called.
* If a superblock is found on this device, we take the s_umount semaphore
* on it to make sure nobody unmounts until the snapshot creation is done.
Expand All @@ -189,7 +189,7 @@ struct super_block *freeze_bdev(struct block_device *bdev)
{
struct super_block *sb;

mutex_lock(&bdev->bd_mount_mutex);
down(&bdev->bd_mount_sem);
sb = get_super(bdev);
if (sb && !(sb->s_flags & MS_RDONLY)) {
sb->s_frozen = SB_FREEZE_WRITE;
Expand Down Expand Up @@ -231,7 +231,7 @@ void thaw_bdev(struct block_device *bdev, struct super_block *sb)
drop_super(sb);
}

mutex_unlock(&bdev->bd_mount_mutex);
up(&bdev->bd_mount_sem);
}
EXPORT_SYMBOL(thaw_bdev);

Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/gfs2/ops_fstype.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,9 +867,9 @@ static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags,
error = -EBUSY;
goto error;
}
mutex_lock(&sb->s_bdev->bd_mount_mutex);
down(&sb->s_bdev->bd_mount_sem);
new = sget(fs_type, test_bdev_super, set_bdev_super, sb->s_bdev);
mutex_unlock(&sb->s_bdev->bd_mount_mutex);
up(&sb->s_bdev->bd_mount_sem);
if (IS_ERR(new)) {
error = PTR_ERR(new);
goto error;
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,9 +753,9 @@ int get_sb_bdev(struct file_system_type *fs_type,
* will protect the lockfs code from trying to start a snapshot
* while we are mounting
*/
mutex_lock(&bdev->bd_mount_mutex);
down(&bdev->bd_mount_sem);
s = sget(fs_type, test_bdev_super, set_bdev_super, bdev);
mutex_unlock(&bdev->bd_mount_mutex);
up(&bdev->bd_mount_sem);
if (IS_ERR(s))
goto error_s;

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ struct block_device {
struct inode * bd_inode; /* will die */
int bd_openers;
struct mutex bd_mutex; /* open/close mutex */
struct mutex bd_mount_mutex; /* mount mutex */
struct semaphore bd_mount_sem;
struct list_head bd_inodes;
void * bd_holder;
int bd_holders;
Expand Down

0 comments on commit 5d556ec

Please sign in to comment.