@@ -1004,46 +1004,6 @@ struct file *bdev_file_open_by_path(const char *path, blk_mode_t mode,
1004
1004
}
1005
1005
EXPORT_SYMBOL (bdev_file_open_by_path );
1006
1006
1007
- /**
1008
- * bdev_open_by_path - open a block device by name
1009
- * @path: path to the block device to open
1010
- * @mode: open mode (BLK_OPEN_*)
1011
- * @holder: exclusive holder identifier
1012
- * @hops: holder operations
1013
- *
1014
- * Open the block device described by the device file at @path. If @holder is
1015
- * not %NULL, the block device is opened with exclusive access. Exclusive opens
1016
- * may nest for the same @holder.
1017
- *
1018
- * CONTEXT:
1019
- * Might sleep.
1020
- *
1021
- * RETURNS:
1022
- * Handle with a reference to the block_device on success, ERR_PTR(-errno) on
1023
- * failure.
1024
- */
1025
- struct bdev_handle * bdev_open_by_path (const char * path , blk_mode_t mode ,
1026
- void * holder , const struct blk_holder_ops * hops )
1027
- {
1028
- struct bdev_handle * handle ;
1029
- dev_t dev ;
1030
- int error ;
1031
-
1032
- error = lookup_bdev (path , & dev );
1033
- if (error )
1034
- return ERR_PTR (error );
1035
-
1036
- handle = bdev_open_by_dev (dev , mode , holder , hops );
1037
- if (!IS_ERR (handle ) && (mode & BLK_OPEN_WRITE ) &&
1038
- bdev_read_only (handle -> bdev )) {
1039
- bdev_release (handle );
1040
- return ERR_PTR (- EACCES );
1041
- }
1042
-
1043
- return handle ;
1044
- }
1045
- EXPORT_SYMBOL (bdev_open_by_path );
1046
-
1047
1007
void bdev_release (struct bdev_handle * handle )
1048
1008
{
1049
1009
struct block_device * bdev = handle -> bdev ;
0 commit comments