Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97805
b: refs/heads/master
c: 7db9cfd
h: refs/heads/master
i:
  97803: a9cf002
v: v3
  • Loading branch information
Pavel Emelyanov authored and Linus Torvalds committed Jun 6, 2008
1 parent 57e1034 commit f5f5dbb
Show file tree
Hide file tree
Showing 2 changed files with 8 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: cc9cb219aac24ffc711566c8f372c2b3a3bf840f
refs/heads/master: 7db9cfd380205f6b50afdc3bc3619f876a5eaf0d
8 changes: 7 additions & 1 deletion trunk/fs/block_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <linux/kmod.h>
#include <linux/major.h>
#include <linux/smp_lock.h>
#include <linux/device_cgroup.h>
#include <linux/highmem.h>
#include <linux/blkdev.h>
#include <linux/module.h>
Expand Down Expand Up @@ -928,9 +929,14 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part)
{
struct module *owner = NULL;
struct gendisk *disk;
int ret = -ENXIO;
int ret;
int part;

ret = devcgroup_inode_permission(bdev->bd_inode, file->f_mode);
if (ret != 0)
return ret;

ret = -ENXIO;
file->f_mapping = bdev->bd_inode->i_mapping;
lock_kernel();
disk = get_gendisk(bdev->bd_dev, &part);
Expand Down

0 comments on commit f5f5dbb

Please sign in to comment.