File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -514,10 +514,11 @@ static inline void bio_check_ro(struct bio *bio)
514
514
if (op_is_flush (bio -> bi_opf ) && !bio_sectors (bio ))
515
515
return ;
516
516
517
- if (bio -> bi_bdev -> bd_ro_warned )
517
+ if (bdev_test_flag ( bio -> bi_bdev , BD_RO_WARNED ) )
518
518
return ;
519
519
520
- bio -> bi_bdev -> bd_ro_warned = true;
520
+ bdev_set_flag (bio -> bi_bdev , BD_RO_WARNED );
521
+
521
522
/*
522
523
* Use ioctl to set underlying disk of raid/dm to read-only
523
524
* will trigger this.
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ struct block_device {
50
50
#define BD_READ_ONLY (1u<<8) // read-only policy
51
51
#define BD_WRITE_HOLDER (1u<<9)
52
52
#define BD_HAS_SUBMIT_BIO (1u<<10)
53
+ #define BD_RO_WARNED (1u<<11)
53
54
dev_t bd_dev ;
54
55
struct inode * bd_inode ; /* will die */
55
56
@@ -69,7 +70,6 @@ struct block_device {
69
70
#ifdef CONFIG_FAIL_MAKE_REQUEST
70
71
bool bd_make_it_fail ;
71
72
#endif
72
- bool bd_ro_warned ;
73
73
int bd_writers ;
74
74
/*
75
75
* keep this out-of-line as it's both big and not needed in the fast
You can’t perform that action at this time.
0 commit comments