From: Jeff Mahoney Subject: btrfs: provide super_operations->inode_get_dev References: bsc#927455 Patch-mainline: No, upstream wants a super_block per anon dev In order to ensure that the per-subvolume anonymous dev_t gets published to userspace, we need to provide the super_operations->get_inode_dev operation. Signed-off-by: Jeff Mahoney --- fs/btrfs/super.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -2264,6 +2264,11 @@ static int btrfs_show_devname(struct seq return 0; } +static dev_t btrfs_get_inode_dev(const struct inode *inode) +{ + return BTRFS_I(inode)->root->anon_dev; +} + static const struct super_operations btrfs_super_ops = { .drop_inode = btrfs_drop_inode, .evict_inode = btrfs_evict_inode, @@ -2278,6 +2283,7 @@ static const struct super_operations btr .remount_fs = btrfs_remount, .freeze_fs = btrfs_freeze, .unfreeze_fs = btrfs_unfreeze, + .get_inode_dev = btrfs_get_inode_dev, }; static const struct file_operations btrfs_ctl_fops = {