Create a function, get_tree_bdev(), that is fs_context-aware and a ->get_tree() counterpart of mount_bdev(). It caches the block device pointer in the fs_context struct so that this information can be passed into sget_fc()'s test and set functions.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -88,6 +88,7 @@ struct fs_context { · 87 unmodified lines | ||
| 88 | 88 | struct mutex uapi_mutex; /* Userspace access mutex */ |
| 89 | 89 | struct file_system_type *fs_type; |
| 90 | 90 | void *fs_private; /* The filesystem's context */ |
| 91 | + void *sget_key; | |
| 91 | 92 | struct dentry *root; /* The root and superblock */ |
| 92 | 93 | struct user_namespace *user_ns; /* The user namespace for this mount */ |
| 93 | 94 | struct net *net_ns; /* The network namespace for this mount */ |
| @@ -159,6 +160,10 @@ extern int get_tree_keyed(struct fs_context *fc, · 65 unmodified lines | ||
| 159 | 160 | struct fs_context *fc), |
| 160 | 161 | void *key); |
| 161 | 162 | |
| 163 | +extern int get_tree_bdev(struct fs_context *fc, | |
| 164 | + int (*fill_super)(struct super_block *sb, | |
| 165 | + struct fs_context *fc)); | |
| 166 | + | |
| 162 | 167 | extern const struct file_operations fscontext_fops; |
| 163 | 168 | |
| 164 | 169 | /* |