mlxsw: spectrum: Create PVID vPort before registering netdevice
[cascardo/linux.git] / fs / block_dev.c
index 5cbd539..ada42cf 100644 (file)
@@ -1846,7 +1846,7 @@ struct block_device *lookup_bdev(const char *pathname)
        if (!S_ISBLK(inode->i_mode))
                goto fail;
        error = -EACCES;
-       if (path.mnt->mnt_flags & MNT_NODEV)
+       if (!may_open_dev(&path))
                goto fail;
        error = -ENOMEM;
        bdev = bd_acquire(inode);