Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100273
b: refs/heads/master
c: 579174a
h: refs/heads/master
i:
  100271: 42ae260
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 25b2627 commit 58d519f
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 764a4a8e54cdd6efc5928f876aa9e35778f22377
refs/heads/master: 579174a55f491edeaccb8f5d3dc7ad69a17f5423
7 changes: 6 additions & 1 deletion trunk/drivers/block/aoe/aoechr.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <linux/hdreg.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/smp_lock.h>
#include "aoe.h"

enum {
Expand Down Expand Up @@ -174,12 +175,16 @@ aoechr_open(struct inode *inode, struct file *filp)
{
int n, i;

lock_kernel();
n = iminor(inode);
filp->private_data = (void *) (unsigned long) n;

for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
if (chardevs[i].minor == n)
if (chardevs[i].minor == n) {
unlock_kernel();
return 0;
}
unlock_kernel();
return -EINVAL;
}

Expand Down

0 comments on commit 58d519f

Please sign in to comment.