Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43505
b: refs/heads/master
c: d63a5a7
h: refs/heads/master
i:
  43503: 103c8f0
v: v3
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Dec 8, 2006
1 parent 20c6561 commit f42df48
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 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: 6796bf54a64df36f96a42ae222423fffe36c58a5
refs/heads/master: d63a5a74dee87883fda6b7d170244acaac5b05e8
2 changes: 1 addition & 1 deletion trunk/drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -4423,7 +4423,7 @@ static int md_open(struct inode *inode, struct file *file)
mddev_t *mddev = inode->i_bdev->bd_disk->private_data;
int err;

if ((err = mddev_lock(mddev)))
if ((err = mutex_lock_interruptible_nested(&mddev->reconfig_mutex, 1)))
goto out;

err = 0;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ extern int fastcall mutex_lock_interruptible(struct mutex *lock);

#ifdef CONFIG_DEBUG_LOCK_ALLOC
extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
extern int mutex_lock_interruptible_nested(struct mutex *lock, unsigned int subclass);
#else
# define mutex_lock_nested(lock, subclass) mutex_lock(lock)
# define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock)
#endif

/*
Expand Down
9 changes: 9 additions & 0 deletions trunk/kernel/mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,15 @@ mutex_lock_nested(struct mutex *lock, unsigned int subclass)
}

EXPORT_SYMBOL_GPL(mutex_lock_nested);

int __sched
mutex_lock_interruptible_nested(struct mutex *lock, unsigned int subclass)
{
might_sleep();
return __mutex_lock_common(lock, TASK_INTERRUPTIBLE, subclass);
}

EXPORT_SYMBOL_GPL(mutex_lock_interruptible_nested);
#endif

/*
Expand Down

0 comments on commit f42df48

Please sign in to comment.