File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -1257,6 +1257,18 @@ void bdev_statx_dioalign(struct inode *inode, struct kstat *stat)
1257
1257
blkdev_put_no_open (bdev );
1258
1258
}
1259
1259
1260
+ bool disk_live (struct gendisk * disk )
1261
+ {
1262
+ return !inode_unhashed (disk -> part0 -> bd_inode );
1263
+ }
1264
+ EXPORT_SYMBOL_GPL (disk_live );
1265
+
1266
+ unsigned int block_size (struct block_device * bdev )
1267
+ {
1268
+ return 1 << bdev -> bd_inode -> i_blkbits ;
1269
+ }
1270
+ EXPORT_SYMBOL_GPL (block_size );
1271
+
1260
1272
static int __init setup_bdev_allow_write_mounted (char * str )
1261
1273
{
1262
1274
if (kstrtobool (str , & bdev_allow_write_mounted ))
Original file line number Diff line number Diff line change @@ -211,11 +211,6 @@ struct gendisk {
211
211
struct blk_independent_access_ranges * ia_ranges ;
212
212
};
213
213
214
- static inline bool disk_live (struct gendisk * disk )
215
- {
216
- return !inode_unhashed (disk -> part0 -> bd_inode );
217
- }
218
-
219
214
/**
220
215
* disk_openers - returns how many openers are there for a disk
221
216
* @disk: disk to check
@@ -1364,11 +1359,6 @@ static inline unsigned int blksize_bits(unsigned int size)
1364
1359
return order_base_2 (size >> SECTOR_SHIFT ) + SECTOR_SHIFT ;
1365
1360
}
1366
1361
1367
- static inline unsigned int block_size (struct block_device * bdev )
1368
- {
1369
- return 1 << bdev -> bd_inode -> i_blkbits ;
1370
- }
1371
-
1372
1362
int kblockd_schedule_work (struct work_struct * work );
1373
1363
int kblockd_mod_delayed_work_on (int cpu , struct delayed_work * dwork , unsigned long delay );
1374
1364
@@ -1536,6 +1526,8 @@ void blkdev_put_no_open(struct block_device *bdev);
1536
1526
1537
1527
struct block_device * I_BDEV (struct inode * inode );
1538
1528
struct block_device * file_bdev (struct file * bdev_file );
1529
+ bool disk_live (struct gendisk * disk );
1530
+ unsigned int block_size (struct block_device * bdev );
1539
1531
1540
1532
#ifdef CONFIG_BLOCK
1541
1533
void invalidate_bdev (struct block_device * bdev );
You can’t perform that action at this time.
0 commit comments