History

vfs: Create fs_context-aware mount_bdev() replacement

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.

David Howells committed 7 years ago

Commit fe62c3a1 parent 533770c2 files · +99 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/fs_context.h+5−0
@@ -88,6 +88,7 @@ struct fs_context { · 87 unmodified lines
88 struct mutex uapi_mutex; /* Userspace access mutex */88 struct mutex uapi_mutex; /* Userspace access mutex */
89 struct file_system_type *fs_type;89 struct file_system_type *fs_type;
90 void *fs_private; /* The filesystem's context */90 void *fs_private; /* The filesystem's context */
91 void *sget_key;
91 struct dentry *root; /* The root and superblock */92 struct dentry *root; /* The root and superblock */
92 struct user_namespace *user_ns; /* The user namespace for this mount */93 struct user_namespace *user_ns; /* The user namespace for this mount */
93 struct net *net_ns; /* The network namespace for this mount */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 struct fs_context *fc),160 struct fs_context *fc),
160 void *key);161 void *key);
161 162
163extern int get_tree_bdev(struct fs_context *fc,
164 int (*fill_super)(struct super_block *sb,
165 struct fs_context *fc));
166
162extern const struct file_operations fscontext_fops;167extern const struct file_operations fscontext_fops;
163 168
164/*169/*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t