diff options
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index e63067d25cdb..67fe72ce6ac7 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -1397,19 +1397,19 @@ struct block_device *lookup_bdev(const char *path) | |||
1397 | if (error) | 1397 | if (error) |
1398 | return ERR_PTR(error); | 1398 | return ERR_PTR(error); |
1399 | 1399 | ||
1400 | inode = nd.dentry->d_inode; | 1400 | inode = nd.path.dentry->d_inode; |
1401 | error = -ENOTBLK; | 1401 | error = -ENOTBLK; |
1402 | if (!S_ISBLK(inode->i_mode)) | 1402 | if (!S_ISBLK(inode->i_mode)) |
1403 | goto fail; | 1403 | goto fail; |
1404 | error = -EACCES; | 1404 | error = -EACCES; |
1405 | if (nd.mnt->mnt_flags & MNT_NODEV) | 1405 | if (nd.path.mnt->mnt_flags & MNT_NODEV) |
1406 | goto fail; | 1406 | goto fail; |
1407 | error = -ENOMEM; | 1407 | error = -ENOMEM; |
1408 | bdev = bd_acquire(inode); | 1408 | bdev = bd_acquire(inode); |
1409 | if (!bdev) | 1409 | if (!bdev) |
1410 | goto fail; | 1410 | goto fail; |
1411 | out: | 1411 | out: |
1412 | path_release(&nd); | 1412 | path_put(&nd.path); |
1413 | return bdev; | 1413 | return bdev; |
1414 | fail: | 1414 | fail: |
1415 | bdev = ERR_PTR(error); | 1415 | bdev = ERR_PTR(error); |