aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-08-13 19:59:15 -0400
committerChris Metcalf <cmetcalf@tilera.com>2010-08-13 19:59:15 -0400
commit7d72e6fa56c4100b9669efe0044f77ed9eb785a1 (patch)
tree5e90bf4969809a1ab20b97432b85be20ccfaa1f4 /fs/block_dev.c
parentba00376b0b13f234d839541a7b36a5bf5c2a4036 (diff)
parent2be1f3a73dd02e38e181cf5abacb3d45a6a2d6b8 (diff)
Merge branch 'master' into for-linus
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c10
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: