Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24424
b: refs/heads/master
c: df5b89b
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Mar 27, 2006
1 parent 2dbba4d commit 37b72d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 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: 48c9c27b8bcd2a328a06151e2d5c1170db0b701b
refs/heads/master: df5b89b323b922f56650b4b4d7c41899b937cf19
14 changes: 7 additions & 7 deletions trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static mddev_t * mddev_find(dev_t unit)
else
new->md_minor = MINOR(unit) >> MdpMinorShift;

init_MUTEX(&new->reconfig_sem);
mutex_init(&new->reconfig_mutex);
INIT_LIST_HEAD(&new->disks);
INIT_LIST_HEAD(&new->all_mddevs);
init_timer(&new->safemode_timer);
Expand All @@ -277,22 +277,22 @@ static mddev_t * mddev_find(dev_t unit)

static inline int mddev_lock(mddev_t * mddev)
{
return down_interruptible(&mddev->reconfig_sem);
return mutex_lock_interruptible(&mddev->reconfig_mutex);
}

static inline void mddev_lock_uninterruptible(mddev_t * mddev)
{
down(&mddev->reconfig_sem);
mutex_lock(&mddev->reconfig_mutex);
}

static inline int mddev_trylock(mddev_t * mddev)
{
return down_trylock(&mddev->reconfig_sem);
return mutex_trylock(&mddev->reconfig_mutex);
}

static inline void mddev_unlock(mddev_t * mddev)
{
up(&mddev->reconfig_sem);
mutex_unlock(&mddev->reconfig_mutex);

md_wakeup_thread(mddev->thread);
}
Expand Down Expand Up @@ -4893,7 +4893,7 @@ void md_check_recovery(mddev_t *mddev)
))
return;

if (mddev_trylock(mddev)==0) {
if (mddev_trylock(mddev)) {
int spares =0;

spin_lock_irq(&mddev->write_lock);
Expand Down Expand Up @@ -5029,7 +5029,7 @@ static int md_notify_reboot(struct notifier_block *this,
printk(KERN_INFO "md: stopping all md devices.\n");

ITERATE_MDDEV(mddev,tmp)
if (mddev_trylock(mddev)==0)
if (mddev_trylock(mddev))
do_md_stop (mddev, 1);
/*
* certain more exotic SCSI devices are known to be
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/raid/md_k.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ struct mddev_s
unsigned long recovery;

int in_sync; /* know to not need resync */
struct semaphore reconfig_sem;
struct mutex reconfig_mutex;
atomic_t active;

int changed; /* true if we might need to reread partition info */
Expand Down

0 comments on commit 37b72d9

Please sign in to comment.