@@ -127,15 +127,15 @@ void dasd_gendisk_free(struct dasd_block *block)
127
127
*/
128
128
int dasd_scan_partitions (struct dasd_block * block )
129
129
{
130
- struct bdev_handle * bdev_handle ;
130
+ struct file * bdev_file ;
131
131
int rc ;
132
132
133
- bdev_handle = bdev_open_by_dev (disk_devt (block -> gdp ), BLK_OPEN_READ ,
133
+ bdev_file = bdev_file_open_by_dev (disk_devt (block -> gdp ), BLK_OPEN_READ ,
134
134
NULL , NULL );
135
- if (IS_ERR (bdev_handle )) {
135
+ if (IS_ERR (bdev_file )) {
136
136
DBF_DEV_EVENT (DBF_ERR , block -> base ,
137
137
"scan partitions error, blkdev_get returned %ld" ,
138
- PTR_ERR (bdev_handle ));
138
+ PTR_ERR (bdev_file ));
139
139
return - ENODEV ;
140
140
}
141
141
@@ -147,15 +147,15 @@ int dasd_scan_partitions(struct dasd_block *block)
147
147
"scan partitions error, rc %d" , rc );
148
148
149
149
/*
150
- * Since the matching bdev_release () call to the
151
- * bdev_open_by_path () in this function is not called before
150
+ * Since the matching fput () call to the
151
+ * bdev_file_open_by_path () in this function is not called before
152
152
* dasd_destroy_partitions the offline open_count limit needs to be
153
- * increased from 0 to 1. This is done by setting device->bdev_handle
153
+ * increased from 0 to 1. This is done by setting device->bdev_file
154
154
* (see dasd_generic_set_offline). As long as the partition detection
155
155
* is running no offline should be allowed. That is why the assignment
156
- * to block->bdev_handle is done AFTER the BLKRRPART ioctl.
156
+ * to block->bdev_file is done AFTER the BLKRRPART ioctl.
157
157
*/
158
- block -> bdev_handle = bdev_handle ;
158
+ block -> bdev_file = bdev_file ;
159
159
return 0 ;
160
160
}
161
161
@@ -165,21 +165,21 @@ int dasd_scan_partitions(struct dasd_block *block)
165
165
*/
166
166
void dasd_destroy_partitions (struct dasd_block * block )
167
167
{
168
- struct bdev_handle * bdev_handle ;
168
+ struct file * bdev_file ;
169
169
170
170
/*
171
- * Get the bdev_handle pointer from the device structure and clear
172
- * device->bdev_handle to lower the offline open_count limit again.
171
+ * Get the bdev_file pointer from the device structure and clear
172
+ * device->bdev_file to lower the offline open_count limit again.
173
173
*/
174
- bdev_handle = block -> bdev_handle ;
175
- block -> bdev_handle = NULL ;
174
+ bdev_file = block -> bdev_file ;
175
+ block -> bdev_file = NULL ;
176
176
177
- mutex_lock (& bdev_handle -> bdev -> bd_disk -> open_mutex );
178
- bdev_disk_changed (bdev_handle -> bdev -> bd_disk , true);
179
- mutex_unlock (& bdev_handle -> bdev -> bd_disk -> open_mutex );
177
+ mutex_lock (& file_bdev ( bdev_file ) -> bd_disk -> open_mutex );
178
+ bdev_disk_changed (file_bdev ( bdev_file ) -> bd_disk , true);
179
+ mutex_unlock (& file_bdev ( bdev_file ) -> bd_disk -> open_mutex );
180
180
181
181
/* Matching blkdev_put to the blkdev_get in dasd_scan_partitions. */
182
- bdev_release ( bdev_handle );
182
+ fput ( bdev_file );
183
183
}
184
184
185
185
int dasd_gendisk_init (void )
0 commit comments