Just use IS_ENABLED instead of providing a stub for !CONFIG_BLOCK.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -2557,6 +2557,12 @@ extern struct kmem_cache *names_cachep; · 2556 unmodified lines | ||
| 2557 | 2557 | #define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL) |
| 2558 | 2558 | #define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) |
| 2559 | 2559 | |
| 2560 | +extern struct super_block *blockdev_superblock; | |
| 2561 | +static inline bool sb_is_blkdev_sb(struct super_block *sb) | |
| 2562 | +{ | |
| 2563 | + return IS_ENABLED(CONFIG_BLOCK) && sb == blockdev_superblock; | |
| 2564 | +} | |
| 2565 | + | |
| 2560 | 2566 | #ifdef CONFIG_BLOCK |
| 2561 | 2567 | extern int register_blkdev(unsigned int, const char *); |
| 2562 | 2568 | extern void unregister_blkdev(unsigned int, const char *); |
| @@ -2572,13 +2578,6 @@ extern struct super_block *freeze_bdev(struct block_device *); · 9 unmodified lines | ||
| 2572 | 2578 | extern void emergency_thaw_bdev(struct super_block *sb); |
| 2573 | 2579 | extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); |
| 2574 | 2580 | extern int fsync_bdev(struct block_device *); |
| 2575 | − | |
| 2576 | −extern struct super_block *blockdev_superblock; | |
| 2577 | − | |
| 2578 | −static inline bool sb_is_blkdev_sb(struct super_block *sb) | |
| 2579 | −{ | |
| 2580 | − return sb == blockdev_superblock; | |
| 2581 | −} | |
| 2582 | 2581 | #else |
| 2583 | 2582 | static inline void bd_forget(struct inode *inode) {} |
| 2584 | 2583 | static inline int sync_blockdev(struct block_device *bdev) { return 0; } |
| @@ -2602,11 +2601,6 @@ static inline int emergency_thaw_bdev(struct super_block *sb) · 17 unmodified lines | ||
| 2602 | 2601 | static inline void iterate_bdevs(void (*f)(struct block_device *, void *), void *arg) |
| 2603 | 2602 | { |
| 2604 | 2603 | } |
| 2605 | − | |
| 2606 | −static inline bool sb_is_blkdev_sb(struct super_block *sb) | |
| 2607 | −{ | |
| 2608 | − return false; | |
| 2609 | −} | |
| 2610 | 2604 | #endif |
| 2611 | 2605 | void emergency_thaw_all(void); |
| 2612 | 2606 | extern int sync_filesystem(struct super_block *); |