diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-13 19:59:15 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2010-08-13 19:59:15 -0400 |
commit | 7d72e6fa56c4100b9669efe0044f77ed9eb785a1 (patch) | |
tree | 5e90bf4969809a1ab20b97432b85be20ccfaa1f4 /fs/block_dev.c | |
parent | ba00376b0b13f234d839541a7b36a5bf5c2a4036 (diff) | |
parent | 2be1f3a73dd02e38e181cf5abacb3d45a6a2d6b8 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 66411463b734..50e8c8582faa 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -1340,10 +1340,12 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) | |||
1340 | /* | 1340 | /* |
1341 | * hooks: /n/, see "layering violations". | 1341 | * hooks: /n/, see "layering violations". |
1342 | */ | 1342 | */ |
1343 | ret = devcgroup_inode_permission(bdev->bd_inode, perm); | 1343 | if (!for_part) { |
1344 | if (ret != 0) { | 1344 | ret = devcgroup_inode_permission(bdev->bd_inode, perm); |
1345 | bdput(bdev); | 1345 | if (ret != 0) { |
1346 | return ret; | 1346 | bdput(bdev); |
1347 | return ret; | ||
1348 | } | ||
1347 | } | 1349 | } |
1348 | 1350 | ||
1349 | restart: | 1351 | restart: |