Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
3c26ff6e
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3c26ff6e
编写于
7月 25, 2010
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
convert get_sb_nodev() users
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
fc14f2fe
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
87 addition
and
73 deletion
+87
-73
drivers/staging/autofs/init.c
drivers/staging/autofs/init.c
+4
-4
drivers/staging/pohmelfs/inode.c
drivers/staging/pohmelfs/inode.c
+4
-5
drivers/staging/smbfs/inode.c
drivers/staging/smbfs/inode.c
+4
-4
fs/autofs4/init.c
fs/autofs4/init.c
+4
-4
fs/coda/inode.c
fs/coda/inode.c
+4
-4
fs/exofs/super.c
fs/exofs/super.c
+5
-5
fs/fuse/inode.c
fs/fuse/inode.c
+4
-4
fs/hostfs/hostfs_kern.c
fs/hostfs/hostfs_kern.c
+4
-4
fs/hppfs/hppfs.c
fs/hppfs/hppfs.c
+4
-4
fs/hugetlbfs/inode.c
fs/hugetlbfs/inode.c
+4
-4
fs/ncpfs/inode.c
fs/ncpfs/inode.c
+4
-4
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/dlmfs/dlmfs.c
+4
-4
fs/ramfs/inode.c
fs/ramfs/inode.c
+8
-9
fs/super.c
fs/super.c
+20
-7
include/linux/fs.h
include/linux/fs.h
+3
-0
include/linux/ramfs.h
include/linux/ramfs.h
+2
-2
mm/shmem.c
mm/shmem.c
+5
-5
未找到文件。
drivers/staging/autofs/init.c
浏览文件 @
3c26ff6e
...
...
@@ -14,16 +14,16 @@
#include <linux/init.h>
#include "autofs_i.h"
static
int
autofs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
autofs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
autofs_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
data
,
autofs_fill_super
);
}
static
struct
file_system_type
autofs_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"autofs"
,
.
get_sb
=
autofs_get_sb
,
.
mount
=
autofs_mount
,
.
kill_sb
=
autofs_kill_sb
,
};
...
...
drivers/staging/pohmelfs/inode.c
浏览文件 @
3c26ff6e
...
...
@@ -1937,11 +1937,10 @@ static int pohmelfs_fill_super(struct super_block *sb, void *data, int silent)
/*
* Some VFS magic here...
*/
static
int
pohmelfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
pohmelfs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
pohmelfs_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
data
,
pohmelfs_fill_super
);
}
/*
...
...
@@ -1958,7 +1957,7 @@ static void pohmelfs_kill_super(struct super_block *sb)
static
struct
file_system_type
pohmel_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"pohmel"
,
.
get_sb
=
pohmelfs_get_sb
,
.
mount
=
pohmelfs_mount
,
.
kill_sb
=
pohmelfs_kill_super
,
};
...
...
drivers/staging/smbfs/inode.c
浏览文件 @
3c26ff6e
...
...
@@ -793,16 +793,16 @@ smb_notify_change(struct dentry *dentry, struct iattr *attr)
return
error
;
}
static
int
smb_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
smb_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
smb_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
data
,
smb_fill_super
);
}
static
struct
file_system_type
smb_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"smbfs"
,
.
get_sb
=
smb_get_sb
,
.
mount
=
smb_mount
,
.
kill_sb
=
kill_anon_super
,
.
fs_flags
=
FS_BINARY_MOUNTDATA
,
};
...
...
fs/autofs4/init.c
浏览文件 @
3c26ff6e
...
...
@@ -14,16 +14,16 @@
#include <linux/init.h>
#include "autofs_i.h"
static
int
autofs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
autofs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
autofs4_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
data
,
autofs4_fill_super
);
}
static
struct
file_system_type
autofs_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"autofs"
,
.
get_sb
=
autofs_get_sb
,
.
mount
=
autofs_mount
,
.
kill_sb
=
autofs4_kill_sb
,
};
...
...
fs/coda/inode.c
浏览文件 @
3c26ff6e
...
...
@@ -306,16 +306,16 @@ static int coda_statfs(struct dentry *dentry, struct kstatfs *buf)
/* init_coda: used by filesystems.c to register coda */
static
int
coda_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
coda_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
coda_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
data
,
coda_fill_super
);
}
struct
file_system_type
coda_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"coda"
,
.
get_sb
=
coda_get_sb
,
.
mount
=
coda_mount
,
.
kill_sb
=
kill_anon_super
,
.
fs_flags
=
FS_BINARY_MOUNTDATA
,
};
...
...
fs/exofs/super.c
浏览文件 @
3c26ff6e
...
...
@@ -659,19 +659,19 @@ static int exofs_fill_super(struct super_block *sb, void *data, int silent)
/*
* Set up the superblock (calls exofs_fill_super eventually)
*/
static
int
exofs_get_sb
(
struct
file_system_type
*
type
,
static
struct
dentry
*
exofs_mount
(
struct
file_system_type
*
type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
void
*
data
)
{
struct
exofs_mountopt
opts
;
int
ret
;
ret
=
parse_options
(
data
,
&
opts
);
if
(
ret
)
return
ret
;
return
ERR_PTR
(
ret
)
;
opts
.
dev_name
=
dev_name
;
return
get_sb_nodev
(
type
,
flags
,
&
opts
,
exofs_fill_super
,
mnt
);
return
mount_nodev
(
type
,
flags
,
&
opts
,
exofs_fill_super
);
}
/*
...
...
@@ -809,7 +809,7 @@ static const struct export_operations exofs_export_ops = {
static
struct
file_system_type
exofs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"exofs"
,
.
get_sb
=
exofs_get_sb
,
.
mount
=
exofs_mount
,
.
kill_sb
=
generic_shutdown_super
,
};
...
...
fs/fuse/inode.c
浏览文件 @
3c26ff6e
...
...
@@ -1041,11 +1041,11 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent)
return
err
;
}
static
int
fuse_get_sb
(
struct
file_system_type
*
fs_type
,
static
struct
dentry
*
fuse_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
raw_data
,
struct
vfsmount
*
mnt
)
void
*
raw_data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
raw_data
,
fuse_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
raw_data
,
fuse_fill_super
);
}
static
void
fuse_kill_sb_anon
(
struct
super_block
*
sb
)
...
...
@@ -1065,7 +1065,7 @@ static struct file_system_type fuse_fs_type = {
.
owner
=
THIS_MODULE
,
.
name
=
"fuse"
,
.
fs_flags
=
FS_HAS_SUBTYPE
,
.
get_sb
=
fuse_get_sb
,
.
mount
=
fuse_mount
,
.
kill_sb
=
fuse_kill_sb_anon
,
};
...
...
fs/hostfs/hostfs_kern.c
浏览文件 @
3c26ff6e
...
...
@@ -962,11 +962,11 @@ static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
return
err
;
}
static
int
hostfs_read_sb
(
struct
file_system_type
*
type
,
static
struct
dentry
*
hostfs_read_sb
(
struct
file_system_type
*
type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
void
*
data
)
{
return
get_sb_nodev
(
type
,
flags
,
data
,
hostfs_fill_sb_common
,
mnt
);
return
mount_nodev
(
type
,
flags
,
data
,
hostfs_fill_sb_common
);
}
static
void
hostfs_kill_sb
(
struct
super_block
*
s
)
...
...
@@ -978,7 +978,7 @@ static void hostfs_kill_sb(struct super_block *s)
static
struct
file_system_type
hostfs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"hostfs"
,
.
get_sb
=
hostfs_read_sb
,
.
mount
=
hostfs_read_sb
,
.
kill_sb
=
hostfs_kill_sb
,
.
fs_flags
=
0
,
};
...
...
fs/hppfs/hppfs.c
浏览文件 @
3c26ff6e
...
...
@@ -748,17 +748,17 @@ static int hppfs_fill_super(struct super_block *sb, void *d, int silent)
return
(
err
);
}
static
int
hppfs_read_super
(
struct
file_system_type
*
type
,
static
struct
dentry
*
hppfs_read_super
(
struct
file_system_type
*
type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
void
*
data
)
{
return
get_sb_nodev
(
type
,
flags
,
data
,
hppfs_fill_super
,
mnt
);
return
mount_nodev
(
type
,
flags
,
data
,
hppfs_fill_super
);
}
static
struct
file_system_type
hppfs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"hppfs"
,
.
get_sb
=
hppfs_read_super
,
.
mount
=
hppfs_read_super
,
.
kill_sb
=
kill_anon_super
,
.
fs_flags
=
0
,
};
...
...
fs/hugetlbfs/inode.c
浏览文件 @
3c26ff6e
...
...
@@ -896,15 +896,15 @@ void hugetlb_put_quota(struct address_space *mapping, long delta)
}
}
static
int
hugetlbfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
hugetlbfs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
hugetlbfs_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
data
,
hugetlbfs_fill_super
);
}
static
struct
file_system_type
hugetlbfs_fs_type
=
{
.
name
=
"hugetlbfs"
,
.
get_sb
=
hugetlbfs_get_sb
,
.
mount
=
hugetlbfs_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
fs/ncpfs/inode.c
浏览文件 @
3c26ff6e
...
...
@@ -1020,16 +1020,16 @@ int ncp_notify_change(struct dentry *dentry, struct iattr *attr)
return
result
;
}
static
int
ncp_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
ncp_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
ncp_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
data
,
ncp_fill_super
);
}
static
struct
file_system_type
ncp_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"ncpfs"
,
.
get_sb
=
ncp_get_sb
,
.
mount
=
ncp_mount
,
.
kill_sb
=
kill_anon_super
,
.
fs_flags
=
FS_BINARY_MOUNTDATA
,
};
...
...
fs/ocfs2/dlmfs/dlmfs.c
浏览文件 @
3c26ff6e
...
...
@@ -643,16 +643,16 @@ static const struct inode_operations dlmfs_file_inode_operations = {
.
setattr
=
dlmfs_file_setattr
,
};
static
int
dlmfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
dlmfs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
dlmfs_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
data
,
dlmfs_fill_super
);
}
static
struct
file_system_type
dlmfs_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"ocfs2_dlmfs"
,
.
get_sb
=
dlmfs_get_sb
,
.
mount
=
dlmfs_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
fs/ramfs/inode.c
浏览文件 @
3c26ff6e
...
...
@@ -255,17 +255,16 @@ int ramfs_fill_super(struct super_block *sb, void *data, int silent)
return
err
;
}
int
ramfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
struct
dentry
*
ramfs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
ramfs_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
data
,
ramfs_fill_super
);
}
static
int
rootfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
rootfs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
|
MS_NOUSER
,
data
,
ramfs_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
|
MS_NOUSER
,
data
,
ramfs_fill_super
);
}
static
void
ramfs_kill_sb
(
struct
super_block
*
sb
)
...
...
@@ -276,12 +275,12 @@ static void ramfs_kill_sb(struct super_block *sb)
static
struct
file_system_type
ramfs_fs_type
=
{
.
name
=
"ramfs"
,
.
get_sb
=
ramfs_get_sb
,
.
mount
=
ramfs_mount
,
.
kill_sb
=
ramfs_kill_sb
,
};
static
struct
file_system_type
rootfs_fs_type
=
{
.
name
=
"rootfs"
,
.
get_sb
=
rootfs_get_sb
,
.
mount
=
rootfs_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
fs/super.c
浏览文件 @
3c26ff6e
...
...
@@ -870,29 +870,42 @@ void kill_block_super(struct super_block *sb)
EXPORT_SYMBOL
(
kill_block_super
);
#endif
int
get_sb
_nodev
(
struct
file_system_type
*
fs_type
,
struct
dentry
*
mount
_nodev
(
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
))
{
int
error
;
struct
super_block
*
s
=
sget
(
fs_type
,
NULL
,
set_anon_super
,
NULL
);
if
(
IS_ERR
(
s
))
return
PTR_ERR
(
s
);
return
ERR_CAST
(
s
);
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
;
simple_set_mnt
(
mnt
,
s
);
return
0
;
return
dget
(
s
->
s_root
);
}
EXPORT_SYMBOL
(
mount_nodev
);
int
get_sb_nodev
(
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_nodev
(
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
;
}
EXPORT_SYMBOL
(
get_sb_nodev
);
static
int
compare_single
(
struct
super_block
*
s
,
void
*
p
)
...
...
include/linux/fs.h
浏览文件 @
3c26ff6e
...
...
@@ -1806,6 +1806,9 @@ extern 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
);
extern
struct
dentry
*
mount_nodev
(
struct
file_system_type
*
fs_type
,
int
flags
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
));
extern
int
get_sb_nodev
(
struct
file_system_type
*
fs_type
,
int
flags
,
void
*
data
,
int
(
*
fill_super
)(
struct
super_block
*
,
void
*
,
int
),
...
...
include/linux/ramfs.h
浏览文件 @
3c26ff6e
...
...
@@ -3,8 +3,8 @@
struct
inode
*
ramfs_get_inode
(
struct
super_block
*
sb
,
const
struct
inode
*
dir
,
int
mode
,
dev_t
dev
);
extern
int
ramfs_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
);
extern
struct
dentry
*
ramfs_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
);
#ifndef CONFIG_MMU
extern
int
ramfs_nommu_expand_for_mapping
(
struct
inode
*
inode
,
size_t
newsize
);
...
...
mm/shmem.c
浏览文件 @
3c26ff6e
...
...
@@ -2538,16 +2538,16 @@ static const struct vm_operations_struct shmem_vm_ops = {
};
static
int
shmem_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
,
struct
vfsmount
*
mnt
)
static
struct
dentry
*
shmem_mount
(
struct
file_system_type
*
fs_type
,
int
flags
,
const
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
shmem_fill_super
,
mnt
);
return
mount_nodev
(
fs_type
,
flags
,
data
,
shmem_fill_super
);
}
static
struct
file_system_type
tmpfs_fs_type
=
{
.
owner
=
THIS_MODULE
,
.
name
=
"tmpfs"
,
.
get_sb
=
shmem_get_sb
,
.
mount
=
shmem_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
@@ -2643,7 +2643,7 @@ void mem_cgroup_get_shmem_target(struct inode *inode, pgoff_t pgoff,
static
struct
file_system_type
tmpfs_fs_type
=
{
.
name
=
"tmpfs"
,
.
get_sb
=
ramfs_get_sb
,
.
mount
=
ramfs_mount
,
.
kill_sb
=
kill_litter_super
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录