Article 6KF0Q Kernel 6.6 from block_device how to get the superblock?

Kernel 6.6 from block_device how to get the superblock?

by
akhurange
from LinuxQuestions.org on (#6KF0Q)
rior to kernel 6.6, struct block_device had member variable:

Code:struct super_block * bd_super;One could check if the block device had a mounted file system or not by checking:

Code:struct super_block *sb = bdev->bd_super;
if (!sb) {
// block device is not mounted.
}But from kernel 6.6., struct block_device doesnt has the member variable: bd_super. Now how to check if the block _device has a mounted file system or not?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments