Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
fc14f2fe
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fc14f2fe
编写于
7月 25, 2010
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
convert get_sb_single() users
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
848b83a5
变更
25
显示空白变更内容
内联
并排
Showing
25 changed file
with
147 addition
and
139 deletion
+147
-139
arch/powerpc/platforms/cell/spufs/inode.c
arch/powerpc/platforms/cell/spufs/inode.c
+5
-5
arch/s390/hypfs/inode.c
arch/s390/hypfs/inode.c
+4
-4
drivers/base/devtmpfs.c
drivers/base/devtmpfs.c
+9
-9
drivers/infiniband/hw/ipath/ipath_fs.c
drivers/infiniband/hw/ipath/ipath_fs.c
+7
-7
drivers/infiniband/hw/qib/qib_fs.c
drivers/infiniband/hw/qib/qib_fs.c
+7
-7
drivers/isdn/capi/capifs.c
drivers/isdn/capi/capifs.c
+4
-4
drivers/misc/ibmasm/ibmasmfs.c
drivers/misc/ibmasm/ibmasmfs.c
+4
-5
drivers/oprofile/oprofilefs.c
drivers/oprofile/oprofilefs.c
+4
-4
drivers/usb/core/inode.c
drivers/usb/core/inode.c
+4
-4
drivers/usb/gadget/f_fs.c
drivers/usb/gadget/f_fs.c
+7
-7
drivers/usb/gadget/inode.c
drivers/usb/gadget/inode.c
+5
-5
drivers/xen/xenfs/super.c
drivers/xen/xenfs/super.c
+4
-4
fs/binfmt_misc.c
fs/binfmt_misc.c
+4
-4
fs/configfs/mount.c
fs/configfs/mount.c
+4
-4
fs/debugfs/inode.c
fs/debugfs/inode.c
+4
-4
fs/devpts/inode.c
fs/devpts/inode.c
+15
-17
fs/fuse/control.c
fs/fuse/control.c
+4
-6
fs/nfsd/nfsctl.c
fs/nfsd/nfsctl.c
+4
-4
fs/openpromfs/inode.c
fs/openpromfs/inode.c
+4
-4
fs/super.c
fs/super.c
+19
-6
include/linux/fs.h
include/linux/fs.h
+3
-0
net/sunrpc/rpc_pipe.c
net/sunrpc/rpc_pipe.c
+9
-9
security/inode.c
security/inode.c
+4
-4
security/selinux/selinuxfs.c
security/selinux/selinuxfs.c
+4
-5
security/smack/smackfs.c
security/smack/smackfs.c
+5
-7
未找到文件。
arch/powerpc/platforms/cell/spufs/inode.c
浏览文件 @
fc14f2fe
...
...
@@ -798,17 +798,17 @@ spufs_fill_super(struct super_block *sb, void *data, int silent)
return
spufs_create_root
(
sb
,
data
);
}
static
int
spufs_
get_sb
(
struct
file_system_type
*
fstype
,
int
flags
,
const
char
*
name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
spufs_
mount
(
struct
file_system_type
*
fstype
,
int
flags
,
const
char
*
name
,
void
*
data
)
{
return
get_sb_single
(
fstype
,
flags
,
data
,
spufs_fill_super
,
mnt
);
return
mount_single
(
fstype
,
flags
,
data
,
spufs_fill_super
);
}
static
struct
file_system_type
spufs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"spufs"
,
.
get_sb
=
spufs_get_sb
,
.
mount
=
spufs_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
arch/s390/hypfs/inode.c
浏览文件 @
fc14f2fe
...
...
@@ -316,10 +316,10 @@ static int hypfs_fill_super(struct super_block *sb, void *data, int silent)
return
0
;
}
static
int
hypfs_get_super
(
struct
file_system_type
*
fst
,
int
flags
,
const
char
*
devname
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
hypfs_mount
(
struct
file_system_type
*
fst
,
int
flags
,
const
char
*
devname
,
void
*
data
)
{
return
get_sb_single
(
fst
,
flags
,
data
,
hypfs_fill_super
,
mnt
);
return
mount_single
(
fst
,
flags
,
data
,
hypfs_fill_super
);
}
static
void
hypfs_kill_super
(
struct
super_block
*
sb
)
...
...
@@ -455,7 +455,7 @@ static const struct file_operations hypfs_file_ops = {
static
struct
file_system_type
hypfs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"s390_hypfs"
,
.
get_sb
=
hypfs_get_super
,
.
mount
=
hypfs_mount
,
.
kill_sb
=
hypfs_kill_super
};
...
...
drivers/base/devtmpfs.c
浏览文件 @
fc14f2fe
...
...
@@ -29,33 +29,33 @@
static
struct
vfsmount
*
dev_mnt
;
#if defined CONFIG_DEVTMPFS_MOUNT
static
int
dev_mount
=
1
;
static
int
mount_dev
=
1
;
#else
static
int
dev_mount
;
static
int
mount_dev
;
#endif
static
DEFINE_MUTEX
(
dirlock
);
static
int
__init
mount_param
(
char
*
str
)
{
dev_mount
=
simple_strtoul
(
str
,
NULL
,
0
);
mount_dev
=
simple_strtoul
(
str
,
NULL
,
0
);
return
1
;
}
__setup
(
"devtmpfs.mount="
,
mount_param
);
static
int
dev_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
dev_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
#ifdef CONFIG_TMPFS
return
get_sb_single
(
fs_type
,
flags
,
data
,
shmem_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
shmem_fill_super
);
#else
return
get_sb_single
(
fs_type
,
flags
,
data
,
ramfs_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
ramfs_fill_super
);
#endif
}
static
struct
file_system_type
dev_fs_type
=
{
.
name
=
"devtmpfs"
,
.
get_sb
=
dev_get_sb
,
.
mount
=
dev_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
@@ -351,7 +351,7 @@ int devtmpfs_mount(const char *mntdir)
{
int
err
;
if
(
!
dev_mount
)
if
(
!
mount_dev
)
return
0
;
if
(
!
dev_mnt
)
...
...
drivers/infiniband/hw/ipath/ipath_fs.c
浏览文件 @
fc14f2fe
...
...
@@ -362,13 +362,13 @@ static int ipathfs_fill_super(struct super_block *sb, void *data,
return
ret
;
}
static
int
ipathfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
ipathfs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
int
ret
=
get_sb_single
(
fs_type
,
flags
,
data
,
ipathfs_fill_super
,
mnt
);
if
(
ret
>=
0
)
ipath_super
=
mnt
->
mnt
_sb
;
struct
dentry
*
ret
;
ret
=
mount_single
(
fs_type
,
flags
,
data
,
ipathfs_fill_super
);
if
(
!
IS_ERR
(
ret
)
)
ipath_super
=
ret
->
d
_sb
;
return
ret
;
}
...
...
@@ -411,7 +411,7 @@ int ipathfs_remove_device(struct ipath_devdata *dd)
static
struct
file_system_type
ipathfs_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"ipathfs"
,
.
get_sb
=
ipathfs_get_sb
,
.
mount
=
ipathfs_mount
,
.
kill_sb
=
ipathfs_kill_super
,
};
...
...
drivers/infiniband/hw/qib/qib_fs.c
浏览文件 @
fc14f2fe
...
...
@@ -555,13 +555,13 @@ static int qibfs_fill_super(struct super_block *sb, void *data, int silent)
return
ret
;
}
static
int
qibfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
qibfs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
int
ret
=
get_sb_single
(
fs_type
,
flags
,
data
,
qibfs_fill_super
,
mnt
);
if
(
ret
>=
0
)
qib_super
=
mnt
->
mnt
_sb
;
struct
dentry
*
ret
;
ret
=
mount_single
(
fs_type
,
flags
,
data
,
qibfs_fill_super
);
if
(
!
IS_ERR
(
ret
)
)
qib_super
=
ret
->
d
_sb
;
return
ret
;
}
...
...
@@ -603,7 +603,7 @@ int qibfs_remove(struct qib_devdata *dd)
static
struct
file_system_type
qibfs_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"ipathfs"
,
.
get_sb
=
qibfs_get_sb
,
.
mount
=
qibfs_mount
,
.
kill_sb
=
qibfs_kill_super
,
};
...
...
drivers/isdn/capi/capifs.c
浏览文件 @
fc14f2fe
...
...
@@ -125,16 +125,16 @@ capifs_fill_super(struct super_block *s, void *data, int silent)
return
-
ENOMEM
;
}
static
int
capifs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
capifs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
capifs_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
capifs_fill_super
);
}
static
struct
file_system_type
capifs_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"capifs"
,
.
get_sb
=
capifs_get_sb
,
.
mount
=
capifs_mount
,
.
kill_sb
=
kill_anon_super
,
};
...
...
drivers/misc/ibmasm/ibmasmfs.c
浏览文件 @
fc14f2fe
...
...
@@ -91,11 +91,10 @@ static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root);
static
int
ibmasmfs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
);
static
int
ibmasmfs_get_super
(
struct
file_system_type
*
fst
,
int
flags
,
const
char
*
name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
ibmasmfs_mount
(
struct
file_system_type
*
fst
,
int
flags
,
const
char
*
name
,
void
*
data
)
{
return
get_sb_single
(
fst
,
flags
,
data
,
ibmasmfs_fill_super
,
mnt
);
return
mount_single
(
fst
,
flags
,
data
,
ibmasmfs_fill_super
);
}
static
const
struct
super_operations
ibmasmfs_s_ops
=
{
...
...
@@ -108,7 +107,7 @@ static const struct file_operations *ibmasmfs_dir_ops = &simple_dir_operations;
static
struct
file_system_type
ibmasmfs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"ibmasmfs"
,
.
get_sb
=
ibmasmfs_get_super
,
.
mount
=
ibmasmfs_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
drivers/oprofile/oprofilefs.c
浏览文件 @
fc14f2fe
...
...
@@ -259,17 +259,17 @@ static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent)
}
static
int
oprofilefs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
oprofilefs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
oprofilefs_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
oprofilefs_fill_super
);
}
static
struct
file_system_type
oprofilefs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"oprofilefs"
,
.
get_sb
=
oprofilefs_get_sb
,
.
mount
=
oprofilefs_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
drivers/usb/core/inode.c
浏览文件 @
fc14f2fe
...
...
@@ -574,16 +574,16 @@ static void fs_remove_file (struct dentry *dentry)
/* --------------------------------------------------------------------- */
static
int
usb_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
usb_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
usbfs_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
usbfs_fill_super
);
}
static
struct
file_system_type
usb_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"usbfs"
,
.
get_sb
=
usb_get_sb
,
.
mount
=
usb_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
drivers/usb/gadget/f_fs.c
浏览文件 @
fc14f2fe
...
...
@@ -1176,9 +1176,9 @@ static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts)
/* "mount -t functionfs dev_name /dev/function" ends up here */
static
int
ffs_fs_
get_sb
(
struct
file_system_type
*
t
,
int
flags
,
const
char
*
dev_name
,
void
*
opts
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
ffs_fs_
mount
(
struct
file_system_type
*
t
,
int
flags
,
const
char
*
dev_name
,
void
*
opts
)
{
struct
ffs_sb_fill_data
data
=
{
.
perms
=
{
...
...
@@ -1194,14 +1194,14 @@ ffs_fs_get_sb(struct file_system_type *t, int flags,
ret
=
functionfs_check_dev_callback
(
dev_name
);
if
(
unlikely
(
ret
<
0
))
return
ret
;
return
ERR_PTR
(
ret
)
;
ret
=
ffs_fs_parse_opts
(
&
data
,
opts
);
if
(
unlikely
(
ret
<
0
))
return
ret
;
return
ERR_PTR
(
ret
)
;
data
.
dev_name
=
dev_name
;
return
get_sb_single
(
t
,
flags
,
&
data
,
ffs_sb_fill
,
mnt
);
return
mount_single
(
t
,
flags
,
&
data
,
ffs_sb_fill
);
}
static
void
...
...
@@ -1220,7 +1220,7 @@ ffs_fs_kill_sb(struct super_block *sb)
static
struct
file_system_type
ffs_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"functionfs"
,
.
get_sb
=
ffs_fs_get_sb
,
.
mount
=
ffs_fs_mount
,
.
kill_sb
=
ffs_fs_kill_sb
,
};
...
...
drivers/usb/gadget/inode.c
浏览文件 @
fc14f2fe
...
...
@@ -2097,11 +2097,11 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent)
}
/* "mount -t gadgetfs path /dev/gadget" ends up here */
static
int
gadgetfs_
get_sb
(
struct
file_system_type
*
t
,
int
flags
,
const
char
*
path
,
void
*
opts
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
gadgetfs_
mount
(
struct
file_system_type
*
t
,
int
flags
,
const
char
*
path
,
void
*
opts
)
{
return
get_sb_single
(
t
,
flags
,
opts
,
gadgetfs_fill_super
,
mnt
);
return
mount_single
(
t
,
flags
,
opts
,
gadgetfs_fill_super
);
}
static
void
...
...
@@ -2119,7 +2119,7 @@ gadgetfs_kill_sb (struct super_block *sb)
static
struct
file_system_type
gadgetfs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
shortname
,
.
get_sb
=
gadgetfs_get_sb
,
.
mount
=
gadgetfs_mount
,
.
kill_sb
=
gadgetfs_kill_sb
,
};
...
...
drivers/xen/xenfs/super.c
浏览文件 @
fc14f2fe
...
...
@@ -121,17 +121,17 @@ static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
return
rc
;
}
static
int
xenfs_
get_sb
(
struct
file_system_type
*
fs_type
,
static
int
xenfs_
mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
xenfs_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
xenfs_fill_super
);
}
static
struct
file_system_type
xenfs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"xenfs"
,
.
get_sb
=
xenfs_get_sb
,
.
mount
=
xenfs_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
fs/binfmt_misc.c
浏览文件 @
fc14f2fe
...
...
@@ -706,10 +706,10 @@ static int bm_fill_super(struct super_block * sb, void * data, int silent)
return
err
;
}
static
int
bm_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
bm_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
bm_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
bm_fill_super
);
}
static
struct
linux_binfmt
misc_format
=
{
...
...
@@ -720,7 +720,7 @@ static struct linux_binfmt misc_format = {
static
struct
file_system_type
bm_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"binfmt_misc"
,
.
get_sb
=
bm_get_sb
,
.
mount
=
bm_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
fs/configfs/mount.c
浏览文件 @
fc14f2fe
...
...
@@ -104,16 +104,16 @@ static int configfs_fill_super(struct super_block *sb, void *data, int silent)
return
0
;
}
static
int
configfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
configfs_do_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
configfs_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
configfs_fill_super
);
}
static
struct
file_system_type
configfs_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"configfs"
,
.
get_sb
=
configfs_get_sb
,
.
mount
=
configfs_do_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
fs/debugfs/inode.c
浏览文件 @
fc14f2fe
...
...
@@ -135,17 +135,17 @@ static int debug_fill_super(struct super_block *sb, void *data, int silent)
return
simple_fill_super
(
sb
,
DEBUGFS_MAGIC
,
debug_files
);
}
static
int
debug_get_sb
(
struct
file_system_type
*
fs_type
,
static
struct
dentry
*
debug_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
debug_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
debug_fill_super
);
}
static
struct
file_system_type
debug_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"debugfs"
,
.
get_sb
=
debug_get_sb
,
.
mount
=
debug_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
fs/devpts/inode.c
浏览文件 @
fc14f2fe
...
...
@@ -331,7 +331,7 @@ static int compare_init_pts_sb(struct super_block *s, void *p)
}
/*
* devpts_
get_sb
()
* devpts_
mount
()
*
* If the '-o newinstance' mount option was specified, mount a new
* (private) instance of devpts. PTYs created in this instance are
...
...
@@ -345,20 +345,20 @@ static int compare_init_pts_sb(struct super_block *s, void *p)
* semantics in devpts while preserving backward compatibility of the
* current 'single-namespace' semantics. i.e all mounts of devpts
* without the 'newinstance' mount option should bind to the initial
* kernel mount, like
get_sb
_single().
* kernel mount, like
mount
_single().
*
* Mounts with 'newinstance' option create a new, private namespace.
*
* NOTE:
*
* For single-mount semantics, devpts cannot use
get_sb
_single(),
* because
get_sb
_single()/sget() find and use the super-block from
* For single-mount semantics, devpts cannot use
mount
_single(),
* because
mount
_single()/sget() find and use the super-block from
* the most recent mount of devpts. But that recent mount may be a
* 'newinstance' mount and
get_sb
_single() would pick the newinstance
* 'newinstance' mount and
mount
_single() would pick the newinstance
* super-block instead of the initial super-block.
*/
static
int
devpts_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
devpts_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
int
error
;
struct
pts_mount_opts
opts
;
...
...
@@ -366,7 +366,7 @@ static int devpts_get_sb(struct file_system_type *fs_type,
error
=
parse_mount_options
(
data
,
PARSE_MOUNT
,
&
opts
);
if
(
error
)
return
error
;
return
ERR_PTR
(
error
)
;
if
(
opts
.
newinstance
)
s
=
sget
(
fs_type
,
NULL
,
set_anon_super
,
NULL
);
...
...
@@ -374,7 +374,7 @@ static int devpts_get_sb(struct file_system_type *fs_type,
s
=
sget
(
fs_type
,
compare_init_pts_sb
,
set_anon_super
,
NULL
);
if
(
IS_ERR
(
s
))
return
PTR_ERR
(
s
);
return
ERR_CAST
(
s
);
if
(
!
s
->
s_root
)
{
s
->
s_flags
=
flags
;
...
...
@@ -390,13 +390,11 @@ static int devpts_get_sb(struct file_system_type *fs_type,
if
(
error
)
goto
out_undo_sget
;
simple_set_mnt
(
mnt
,
s
);
return
0
;
return
dget
(
s
->
s_root
);
out_undo_sget:
deactivate_locked_super
(
s
);
return
error
;
return
ERR_PTR
(
error
)
;
}
#else
...
...
@@ -404,10 +402,10 @@ static int devpts_get_sb(struct file_system_type *fs_type,
* This supports only the legacy single-instance semantics (no
* multiple-instance semantics)
*/
static
int
devpts_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
devpts_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
devpts_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
devpts_fill_super
);
}
#endif
...
...
@@ -421,7 +419,7 @@ static void devpts_kill_sb(struct super_block *sb)
static
struct
file_system_type
devpts_fs_type
=
{
.
name
=
"devpts"
,
.
get_sb
=
devpts_get_sb
,
.
mount
=
devpts_mount
,
.
kill_sb
=
devpts_kill_sb
,
};
...
...
fs/fuse/control.c
浏览文件 @
fc14f2fe
...
...
@@ -322,12 +322,10 @@ static int fuse_ctl_fill_super(struct super_block *sb, void *data, int silent)
return
0
;
}
static
int
fuse_ctl_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
raw_data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
fuse_ctl_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
raw_data
)
{
return
get_sb_single
(
fs_type
,
flags
,
raw_data
,
fuse_ctl_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
raw_data
,
fuse_ctl_fill_super
);
}
static
void
fuse_ctl_kill_sb
(
struct
super_block
*
sb
)
...
...
@@ -346,7 +344,7 @@ static void fuse_ctl_kill_sb(struct super_block *sb)
static
struct
file_system_type
fuse_ctl_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"fusectl"
,
.
get_sb
=
fuse_ctl_get_sb
,
.
mount
=
fuse_ctl_mount
,
.
kill_sb
=
fuse_ctl_kill_sb
,
};
...
...
fs/nfsd/nfsctl.c
浏览文件 @
fc14f2fe
...
...
@@ -1405,16 +1405,16 @@ static int nfsd_fill_super(struct super_block * sb, void * data, int silent)
return
simple_fill_super
(
sb
,
0x6e667364
,
nfsd_files
);
}
static
int
nfsd_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
nfsd_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
nfsd_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
nfsd_fill_super
);
}
static
struct
file_system_type
nfsd_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"nfsd"
,
.
get_sb
=
nfsd_get_sb
,
.
mount
=
nfsd_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
fs/openpromfs/inode.c
浏览文件 @
fc14f2fe
...
...
@@ -415,16 +415,16 @@ static int openprom_fill_super(struct super_block *s, void *data, int silent)
return
ret
;
}
static
int
openprom_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
openprom_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
openprom_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
openprom_fill_super
)
}
static
struct
file_system_type
openprom_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"openpromfs"
,
.
get_sb
=
openprom_get_sb
,
.
mount
=
openprom_mount
,
.
kill_sb
=
kill_anon_super
,
};
...
...
fs/super.c
浏览文件 @
fc14f2fe
...
...
@@ -900,29 +900,42 @@ static int compare_single(struct super_block *s, void *p)
return
1
;
}
int
get_sb
_single
(
struct
file_system_type
*
fs_type
,
struct
dentry
*
mount
_single
(
struct
file_system_type
*
fs_type
,
int
flags
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
),
struct
vfsmount
*
mnt
)
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
))
{
struct
super_block
*
s
;
int
error
;
s
=
sget
(
fs_type
,
compare_single
,
set_anon_super
,
NULL
);
if
(
IS_ERR
(
s
))
return
PTR_ERR
(
s
);
return
ERR_CAST
(
s
);
if
(
!
s
->
s_root
)
{
s
->
s_flags
=
flags
;
error
=
fill_super
(
s
,
data
,
flags
&
MS_SILENT
?
1
:
0
);
if
(
error
)
{
deactivate_locked_super
(
s
);
return
error
;
return
ERR_PTR
(
error
)
;
}
s
->
s_flags
|=
MS_ACTIVE
;
}
else
{
do_remount_sb
(
s
,
flags
,
data
,
0
);
}
simple_set_mnt
(
mnt
,
s
);
return
dget
(
s
->
s_root
);
}
EXPORT_SYMBOL
(
mount_single
);
int
get_sb_single
(
struct
file_system_type
*
fs_type
,
int
flags
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
),
struct
vfsmount
*
mnt
)
{
struct
dentry
*
root
;
root
=
mount_single
(
fs_type
,
flags
,
data
,
fill_super
);
if
(
IS_ERR
(
root
))
return
PTR_ERR
(
root
);
mnt
->
mnt_root
=
root
;
mnt
->
mnt_sb
=
root
->
d_sb
;
return
0
;
}
...
...
include/linux/fs.h
浏览文件 @
fc14f2fe
...
...
@@ -1799,6 +1799,9 @@ extern int get_sb_bdev(struct file_system_type *fs_type,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
),
struct
vfsmount
*
mnt
);
extern
struct
dentry
*
mount_single
(
struct
file_system_type
*
fs_type
,
int
flags
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
));
extern
int
get_sb_single
(
struct
file_system_type
*
fs_type
,
int
flags
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
),
...
...
net/sunrpc/rpc_pipe.c
浏览文件 @
fc14f2fe
...
...
@@ -28,7 +28,7 @@
#include <linux/sunrpc/rpc_pipe_fs.h>
#include <linux/sunrpc/cache.h>
static
struct
vfsmount
*
rpc_m
ou
nt
__read_mostly
;
static
struct
vfsmount
*
rpc_mnt
__read_mostly
;
static
int
rpc_mount_count
;
static
struct
file_system_type
rpc_pipe_fs_type
;
...
...
@@ -417,16 +417,16 @@ struct vfsmount *rpc_get_mount(void)
{
int
err
;
err
=
simple_pin_fs
(
&
rpc_pipe_fs_type
,
&
rpc_m
ou
nt
,
&
rpc_mount_count
);
err
=
simple_pin_fs
(
&
rpc_pipe_fs_type
,
&
rpc_mnt
,
&
rpc_mount_count
);
if
(
err
!=
0
)
return
ERR_PTR
(
err
);
return
rpc_m
ou
nt
;
return
rpc_mnt
;
}
EXPORT_SYMBOL_GPL
(
rpc_get_mount
);
void
rpc_put_mount
(
void
)
{
simple_release_fs
(
&
rpc_m
ou
nt
,
&
rpc_mount_count
);
simple_release_fs
(
&
rpc_mnt
,
&
rpc_mount_count
);
}
EXPORT_SYMBOL_GPL
(
rpc_put_mount
);
...
...
@@ -1018,17 +1018,17 @@ rpc_fill_super(struct super_block *sb, void *data, int silent)
return
0
;
}
static
int
rpc_
get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
rpc_
mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
rpc_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
rpc_fill_super
);
}
static
struct
file_system_type
rpc_pipe_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"rpc_pipefs"
,
.
get_sb
=
rpc_get_sb
,
.
mount
=
rpc_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
security/inode.c
浏览文件 @
fc14f2fe
...
...
@@ -131,17 +131,17 @@ static int fill_super(struct super_block *sb, void *data, int silent)
return
simple_fill_super
(
sb
,
SECURITYFS_MAGIC
,
files
);
}
static
int
get_sb
(
struct
file_system_type
*
fs_type
,
static
struct
dentry
*
get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
fill_super
);
}
static
struct
file_system_type
fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"securityfs"
,
.
get_sb
=
get_sb
,
.
mount
=
get_sb
,
.
kill_sb
=
kill_litter_super
,
};
...
...
security/selinux/selinuxfs.c
浏览文件 @
fc14f2fe
...
...
@@ -1909,16 +1909,15 @@ static int sel_fill_super(struct super_block *sb, void *data, int silent)
goto
out
;
}
static
int
sel_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
sel_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
sel_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
sel_fill_super
);
}
static
struct
file_system_type
sel_fs_type
=
{
.
name
=
"selinuxfs"
,
.
get_sb
=
sel_get_sb
,
.
mount
=
sel_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
security/smack/smackfs.c
浏览文件 @
fc14f2fe
...
...
@@ -1310,27 +1310,25 @@ static int smk_fill_super(struct super_block *sb, void *data, int silent)
}
/**
* smk_
get_sb
- get the smackfs superblock
* smk_
mount
- get the smackfs superblock
* @fs_type: passed along without comment
* @flags: passed along without comment
* @dev_name: passed along without comment
* @data: passed along without comment
* @mnt: passed along without comment
*
* Just passes everything along.
*
* Returns what the lower level code does.
*/
static
int
smk_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
smk_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_single
(
fs_type
,
flags
,
data
,
smk_fill_super
,
mnt
);
return
mount_single
(
fs_type
,
flags
,
data
,
smk_fill_super
);
}
static
struct
file_system_type
smk_fs_type
=
{
.
name
=
"smackfs"
,
.
get_sb
=
smk_get_sb
,
.
mount
=
smk_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录