Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100295
b: refs/heads/master
c: 20613f2
h: refs/heads/master
i:
  100293: 9f1164e
  100291: f65a747
  100287: 4c3e5c4
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 5eefc0f commit 1250fcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1bcaa0bd6fd5b510dd9f1ba2da114d3f1253af61
refs/heads/master: 20613f24bcd1cbfb08e64f0bb00c44481313b448
3 changes: 3 additions & 0 deletions trunk/drivers/usb/core/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/rwsem.h>
#include <linux/smp_lock.h>
#include <linux/usb.h>

#include "usb.h"
Expand All @@ -33,6 +34,7 @@ static int usb_open(struct inode * inode, struct file * file)
int err = -ENODEV;
const struct file_operations *old_fops, *new_fops = NULL;

lock_kernel();
down_read(&minor_rwsem);
c = usb_minors[minor];

Expand All @@ -51,6 +53,7 @@ static int usb_open(struct inode * inode, struct file * file)
fops_put(old_fops);
done:
up_read(&minor_rwsem);
unlock_kernel();
return err;
}

Expand Down

0 comments on commit 1250fcf

Please sign in to comment.