Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
318ceed0
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,发现更多精彩内容 >>
提交
318ceed0
编写于
2月 12, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tidy up after d_make_root() conversion
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
ca85c078
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
26 addition
and
53 deletion
+26
-53
drivers/misc/ibmasm/ibmasmfs.c
drivers/misc/ibmasm/ibmasmfs.c
+6
-8
drivers/oprofile/oprofilefs.c
drivers/oprofile/oprofilefs.c
+3
-6
drivers/usb/core/inode.c
drivers/usb/core/inode.c
+2
-4
fs/pstore/inode.c
fs/pstore/inode.c
+7
-17
fs/ramfs/inode.c
fs/ramfs/inode.c
+6
-14
mm/shmem.c
mm/shmem.c
+2
-4
未找到文件。
drivers/misc/ibmasm/ibmasmfs.c
浏览文件 @
318ceed0
...
...
@@ -87,7 +87,7 @@
static
LIST_HEAD
(
service_processors
);
static
struct
inode
*
ibmasmfs_make_inode
(
struct
super_block
*
sb
,
int
mode
);
static
void
ibmasmfs_create_files
(
struct
super_block
*
sb
,
struct
dentry
*
root
);
static
void
ibmasmfs_create_files
(
struct
super_block
*
sb
);
static
int
ibmasmfs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
);
...
...
@@ -114,7 +114,6 @@ static struct file_system_type ibmasmfs_type = {
static
int
ibmasmfs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
inode
*
root
;
struct
dentry
*
root_dentry
;
sb
->
s_blocksize
=
PAGE_CACHE_SIZE
;
sb
->
s_blocksize_bits
=
PAGE_CACHE_SHIFT
;
...
...
@@ -129,12 +128,11 @@ static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent)
root
->
i_op
=
&
simple_dir_inode_operations
;
root
->
i_fop
=
ibmasmfs_dir_ops
;
root_dentry
=
d_make_root
(
root
);
if
(
!
root_dentry
)
sb
->
s_root
=
d_make_root
(
root
);
if
(
!
sb
->
s_root
)
return
-
ENOMEM
;
sb
->
s_root
=
root_dentry
;
ibmasmfs_create_files
(
sb
,
root_dentry
);
ibmasmfs_create_files
(
sb
);
return
0
;
}
...
...
@@ -610,7 +608,7 @@ static const struct file_operations remote_settings_fops = {
};
static
void
ibmasmfs_create_files
(
struct
super_block
*
sb
,
struct
dentry
*
root
)
static
void
ibmasmfs_create_files
(
struct
super_block
*
sb
)
{
struct
list_head
*
entry
;
struct
service_processor
*
sp
;
...
...
@@ -619,7 +617,7 @@ static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root)
struct
dentry
*
dir
;
struct
dentry
*
remote_dir
;
sp
=
list_entry
(
entry
,
struct
service_processor
,
node
);
dir
=
ibmasmfs_create_dir
(
sb
,
root
,
sp
->
dirname
);
dir
=
ibmasmfs_create_dir
(
sb
,
sb
->
s_
root
,
sp
->
dirname
);
if
(
!
dir
)
continue
;
...
...
drivers/oprofile/oprofilefs.c
浏览文件 @
318ceed0
...
...
@@ -238,7 +238,6 @@ struct dentry *oprofilefs_mkdir(struct super_block *sb,
static
int
oprofilefs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
inode
*
root_inode
;
struct
dentry
*
root_dentry
;
sb
->
s_blocksize
=
PAGE_CACHE_SIZE
;
sb
->
s_blocksize_bits
=
PAGE_CACHE_SHIFT
;
...
...
@@ -251,13 +250,11 @@ static int oprofilefs_fill_super(struct super_block *sb, void *data, int silent)
return
-
ENOMEM
;
root_inode
->
i_op
=
&
simple_dir_inode_operations
;
root_inode
->
i_fop
=
&
simple_dir_operations
;
root_dentry
=
d_make_root
(
root_inode
);
if
(
!
root_dentry
)
sb
->
s_root
=
d_make_root
(
root_inode
);
if
(
!
sb
->
s_root
)
return
-
ENOMEM
;
sb
->
s_root
=
root_dentry
;
oprofile_create_files
(
sb
,
root_dentry
);
oprofile_create_files
(
sb
,
sb
->
s_root
);
// FIXME: verify kill_litter_super removes our dentries
return
0
;
...
...
drivers/usb/core/inode.c
浏览文件 @
318ceed0
...
...
@@ -454,7 +454,6 @@ static const struct super_operations usbfs_ops = {
static
int
usbfs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
inode
*
inode
;
struct
dentry
*
root
;
sb
->
s_blocksize
=
PAGE_CACHE_SIZE
;
sb
->
s_blocksize_bits
=
PAGE_CACHE_SHIFT
;
...
...
@@ -462,12 +461,11 @@ static int usbfs_fill_super(struct super_block *sb, void *data, int silent)
sb
->
s_op
=
&
usbfs_ops
;
sb
->
s_time_gran
=
1
;
inode
=
usbfs_get_inode
(
sb
,
S_IFDIR
|
0755
,
0
);
root
=
d_make_root
(
inode
);
if
(
!
root
)
{
sb
->
s_
root
=
d_make_root
(
inode
);
if
(
!
sb
->
s_
root
)
{
dbg
(
"%s: could not get root dentry!"
,
__func__
);
return
-
ENOMEM
;
}
sb
->
s_root
=
root
;
return
0
;
}
...
...
fs/pstore/inode.c
浏览文件 @
318ceed0
...
...
@@ -278,9 +278,7 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id,
int
pstore_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
inode
*
inode
=
NULL
;
struct
dentry
*
root
;
int
err
;
struct
inode
*
inode
;
save_mount_options
(
sb
,
data
);
...
...
@@ -296,25 +294,17 @@ int pstore_fill_super(struct super_block *sb, void *data, int silent)
parse_options
(
data
);
inode
=
pstore_get_inode
(
sb
,
NULL
,
S_IFDIR
|
0755
,
0
);
if
(
!
inode
)
{
err
=
-
ENOMEM
;
goto
fail
;
}
if
(
inode
)
{
/* override ramfs "dir" options so we catch unlink(2) */
inode
->
i_op
=
&
pstore_dir_inode_operations
;
root
=
d_make_root
(
inode
);
sb
->
s_root
=
root
;
if
(
!
root
)
{
err
=
-
ENOMEM
;
goto
fail
;
}
sb
->
s_root
=
d_make_root
(
inode
);
if
(
!
sb
->
s_root
)
return
-
ENOMEM
;
pstore_get_records
(
0
);
return
0
;
fail:
return
err
;
}
static
struct
dentry
*
pstore_mount
(
struct
file_system_type
*
fs_type
,
...
...
fs/ramfs/inode.c
浏览文件 @
318ceed0
...
...
@@ -209,21 +209,19 @@ static int ramfs_parse_options(char *data, struct ramfs_mount_opts *opts)
int
ramfs_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
ramfs_fs_info
*
fsi
;
struct
inode
*
inode
=
NULL
;
struct
inode
*
inode
;
int
err
;
save_mount_options
(
sb
,
data
);
fsi
=
kzalloc
(
sizeof
(
struct
ramfs_fs_info
),
GFP_KERNEL
);
sb
->
s_fs_info
=
fsi
;
if
(
!
fsi
)
{
err
=
-
ENOMEM
;
goto
fail
;
}
if
(
!
fsi
)
return
-
ENOMEM
;
err
=
ramfs_parse_options
(
data
,
&
fsi
->
mount_opts
);
if
(
err
)
goto
fail
;
return
err
;
sb
->
s_maxbytes
=
MAX_LFS_FILESIZE
;
sb
->
s_blocksize
=
PAGE_CACHE_SIZE
;
...
...
@@ -234,16 +232,10 @@ int ramfs_fill_super(struct super_block *sb, void *data, int silent)
inode
=
ramfs_get_inode
(
sb
,
NULL
,
S_IFDIR
|
fsi
->
mount_opts
.
mode
,
0
);
sb
->
s_root
=
d_make_root
(
inode
);
if
(
!
sb
->
s_root
)
{
err
=
-
ENOMEM
;
goto
fail
;
}
if
(
!
sb
->
s_root
)
return
-
ENOMEM
;
return
0
;
fail:
kfree
(
fsi
);
sb
->
s_fs_info
=
NULL
;
return
err
;
}
struct
dentry
*
ramfs_mount
(
struct
file_system_type
*
fs_type
,
...
...
mm/shmem.c
浏览文件 @
318ceed0
...
...
@@ -2175,7 +2175,6 @@ static void shmem_put_super(struct super_block *sb)
int
shmem_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
{
struct
inode
*
inode
;
struct
dentry
*
root
;
struct
shmem_sb_info
*
sbinfo
;
int
err
=
-
ENOMEM
;
...
...
@@ -2232,10 +2231,9 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
goto
failed
;
inode
->
i_uid
=
sbinfo
->
uid
;
inode
->
i_gid
=
sbinfo
->
gid
;
root
=
d_make_root
(
inode
);
if
(
!
root
)
sb
->
s_
root
=
d_make_root
(
inode
);
if
(
!
sb
->
s_
root
)
goto
failed
;
sb
->
s_root
=
root
;
return
0
;
failed:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录