Commit 143845d1 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (1/8) ->get_sb() switchover

	OK, here comes the long-promised switchover to ->get_sb().

New method added - ->get_sb(type, flags, dev, data).  At this point we
still keep ->read_super(), but it will go away in the end of series. 
->get_sb() is a generalization of get_sb_{bdev,nodev,single}() - as the
matter of fact, these will become common helpers used by filesystems in
their ->get_sb(). 
parent c3463389
...@@ -792,7 +792,9 @@ do_kern_mount(const char *fstype, int flags, char *name, void *data) ...@@ -792,7 +792,9 @@ do_kern_mount(const char *fstype, int flags, char *name, void *data)
mnt = alloc_vfsmnt(name); mnt = alloc_vfsmnt(name);
if (!mnt) if (!mnt)
goto out; goto out;
if (type->fs_flags & FS_REQUIRES_DEV) if (type->get_sb)
sb = type->get_sb(type, flags, name, data);
else if (type->fs_flags & FS_REQUIRES_DEV)
sb = get_sb_bdev(type, flags, name, data); sb = get_sb_bdev(type, flags, name, data);
else if (type->fs_flags & FS_SINGLE) else if (type->fs_flags & FS_SINGLE)
sb = get_sb_single(type, flags, name, data); sb = get_sb_single(type, flags, name, data);
......
...@@ -926,9 +926,20 @@ struct dquot_operations { ...@@ -926,9 +926,20 @@ struct dquot_operations {
int (*transfer) (struct inode *, struct iattr *); int (*transfer) (struct inode *, struct iattr *);
}; };
/*
* NOTE NOTE NOTE
*
* ->read_super() is going to die. New method (->get_sb) should replace
* it. The only reason why ->read_super() is left for _SHORT_ transition
* period is to avoid a single patch touching every fs. They will be
* converted one-by-one and ONCE THAT IS DONE OR TWO WEEKS HAD PASSED
* (whatever sooner) ->read_super() WILL DISAPPEAR.
*/
struct file_system_type { struct file_system_type {
const char *name; const char *name;
int fs_flags; int fs_flags;
struct super_block *(*get_sb) (struct file_system_type *, int, char *, void *);
struct super_block *(*read_super) (struct super_block *, void *, int); struct super_block *(*read_super) (struct super_block *, void *, int);
struct module *owner; struct module *owner;
struct file_system_type * next; struct file_system_type * next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment