Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141052
b: refs/heads/master
c: b125130
h: refs/heads/master
v: v3
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Mar 21, 2009
1 parent c2b10da commit 44c74d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: cd649b8bb830d65c57c3c8b98d57b5402256d8bd
refs/heads/master: b125130b22d67f249beba10b71a254558b5279d0
13 changes: 11 additions & 2 deletions trunk/kernel/trace/blktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,14 @@ static int blk_str2act_mask(const char *str)
return mask;
}

static struct request_queue *blk_trace_get_queue(struct block_device *bdev)
{
if (bdev->bd_disk == NULL)
return NULL;

return bdev_get_queue(bdev);
}

static ssize_t sysfs_blk_trace_attr_show(struct device *dev,
struct device_attribute *attr,
char *buf)
Expand All @@ -1376,9 +1384,10 @@ static ssize_t sysfs_blk_trace_attr_show(struct device *dev,
if (bdev == NULL)
goto out_unlock_kernel;

q = bdev_get_queue(bdev);
q = blk_trace_get_queue(bdev);
if (q == NULL)
goto out_bdput;

mutex_lock(&bdev->bd_mutex);

if (attr == &dev_attr_enable) {
Expand Down Expand Up @@ -1435,7 +1444,7 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev,
if (bdev == NULL)
goto out_unlock_kernel;

q = bdev_get_queue(bdev);
q = blk_trace_get_queue(bdev);
if (q == NULL)
goto out_bdput;

Expand Down

0 comments on commit 44c74d4

Please sign in to comment.