Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212927
b: refs/heads/master
c: 01b284f
h: refs/heads/master
i:
  212925: 3edcdb6
  212923: bf74e6b
  212919: 8ab49a9
  212911: f5f9126
  212895: fe88583
  212863: b277bf5
v: v3
  • Loading branch information
Arnd Bergmann committed Oct 19, 2010
1 parent c486c26 commit fc2bcae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 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: 0fc86c7bd924debd0bddee790ecc884604fdcc63
refs/heads/master: 01b284f9b6d51cc3f3bcf3b49f16d2601d3ca22d
14 changes: 3 additions & 11 deletions trunk/kernel/trace/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/debugfs.h>
#include <linux/smp_lock.h>
#include <linux/time.h>
#include <linux/uaccess.h>

Expand Down Expand Up @@ -639,7 +638,6 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg)
if (!q)
return -ENXIO;

lock_kernel();
mutex_lock(&bdev->bd_mutex);

switch (cmd) {
Expand Down Expand Up @@ -667,7 +665,6 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg)
}

mutex_unlock(&bdev->bd_mutex);
unlock_kernel();
return ret;
}

Expand Down Expand Up @@ -1652,10 +1649,9 @@ static ssize_t sysfs_blk_trace_attr_show(struct device *dev,
struct block_device *bdev;
ssize_t ret = -ENXIO;

lock_kernel();
bdev = bdget(part_devt(p));
if (bdev == NULL)
goto out_unlock_kernel;
goto out;

q = blk_trace_get_queue(bdev);
if (q == NULL)
Expand Down Expand Up @@ -1683,8 +1679,7 @@ static ssize_t sysfs_blk_trace_attr_show(struct device *dev,
mutex_unlock(&bdev->bd_mutex);
out_bdput:
bdput(bdev);
out_unlock_kernel:
unlock_kernel();
out:
return ret;
}

Expand Down Expand Up @@ -1714,11 +1709,10 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev,

ret = -ENXIO;

lock_kernel();
p = dev_to_part(dev);
bdev = bdget(part_devt(p));
if (bdev == NULL)
goto out_unlock_kernel;
goto out;

q = blk_trace_get_queue(bdev);
if (q == NULL)
Expand Down Expand Up @@ -1753,8 +1747,6 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev,
mutex_unlock(&bdev->bd_mutex);
out_bdput:
bdput(bdev);
out_unlock_kernel:
unlock_kernel();
out:
return ret ? ret : count;
}
Expand Down

0 comments on commit fc2bcae

Please sign in to comment.