Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
4a343664
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4a343664
编写于
8月 15, 2016
作者:
M
Martin Brandenburg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
orangefs: remove duplicated sysfs_ops structures
Signed-off-by:
N
Martin Brandenburg
<
martin@omnibond.com
>
上级
7b0cae60
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
58 deletion
+15
-58
fs/orangefs/orangefs-sysfs.c
fs/orangefs/orangefs-sysfs.c
+15
-58
未找到文件。
fs/orangefs/orangefs-sysfs.c
浏览文件 @
4a343664
...
@@ -155,19 +155,11 @@ static ssize_t orangefs_attr_show(struct kobject *kobj,
...
@@ -155,19 +155,11 @@ static ssize_t orangefs_attr_show(struct kobject *kobj,
char
*
buf
)
char
*
buf
)
{
{
struct
orangefs_attribute
*
attribute
;
struct
orangefs_attribute
*
attribute
;
int
rc
;
attribute
=
container_of
(
attr
,
struct
orangefs_attribute
,
attr
);
attribute
=
container_of
(
attr
,
struct
orangefs_attribute
,
attr
);
if
(
!
attribute
->
show
)
if
(
!
attribute
->
show
)
{
return
-
EIO
;
rc
=
-
EIO
;
return
attribute
->
show
(
kobj
,
attribute
,
buf
);
goto
out
;
}
rc
=
attribute
->
show
(
kobj
,
attribute
,
buf
);
out:
return
rc
;
}
}
static
ssize_t
orangefs_attr_store
(
struct
kobject
*
kobj
,
static
ssize_t
orangefs_attr_store
(
struct
kobject
*
kobj
,
...
@@ -176,22 +168,15 @@ static ssize_t orangefs_attr_store(struct kobject *kobj,
...
@@ -176,22 +168,15 @@ static ssize_t orangefs_attr_store(struct kobject *kobj,
size_t
len
)
size_t
len
)
{
{
struct
orangefs_attribute
*
attribute
;
struct
orangefs_attribute
*
attribute
;
int
rc
;
gossip_debug
(
GOSSIP_SYSFS_DEBUG
,
if
(
!
strcmp
(
kobj
->
name
,
PC_KOBJ_ID
)
||
"orangefs_attr_store: start
\n
"
);
!
strcmp
(
kobj
->
name
,
STATS_KOBJ_ID
))
return
-
EPERM
;
attribute
=
container_of
(
attr
,
struct
orangefs_attribute
,
attr
);
attribute
=
container_of
(
attr
,
struct
orangefs_attribute
,
attr
);
if
(
!
attribute
->
store
)
if
(
!
attribute
->
store
)
{
return
-
EIO
;
rc
=
-
EIO
;
return
attribute
->
store
(
kobj
,
attribute
,
buf
,
len
);
goto
out
;
}
rc
=
attribute
->
store
(
kobj
,
attribute
,
buf
,
len
);
out:
return
rc
;
}
}
static
const
struct
sysfs_ops
orangefs_sysfs_ops
=
{
static
const
struct
sysfs_ops
orangefs_sysfs_ops
=
{
...
@@ -199,34 +184,6 @@ static const struct sysfs_ops orangefs_sysfs_ops = {
...
@@ -199,34 +184,6 @@ static const struct sysfs_ops orangefs_sysfs_ops = {
.
store
=
orangefs_attr_store
,
.
store
=
orangefs_attr_store
,
};
};
static
const
struct
sysfs_ops
acache_orangefs_sysfs_ops
=
{
.
show
=
orangefs_attr_show
,
.
store
=
orangefs_attr_store
,
};
static
const
struct
sysfs_ops
capcache_orangefs_sysfs_ops
=
{
.
show
=
orangefs_attr_show
,
.
store
=
orangefs_attr_store
,
};
static
const
struct
sysfs_ops
ccache_orangefs_sysfs_ops
=
{
.
show
=
orangefs_attr_show
,
.
store
=
orangefs_attr_store
,
};
static
const
struct
sysfs_ops
ncache_orangefs_sysfs_ops
=
{
.
show
=
orangefs_attr_show
,
.
store
=
orangefs_attr_store
,
};
static
const
struct
sysfs_ops
pc_orangefs_sysfs_ops
=
{
.
show
=
orangefs_attr_show
,
};
static
const
struct
sysfs_ops
stats_orangefs_sysfs_ops
=
{
.
show
=
orangefs_attr_show
,
};
static
ssize_t
sysfs_int_show
(
struct
kobject
*
kobj
,
static
ssize_t
sysfs_int_show
(
struct
kobject
*
kobj
,
struct
orangefs_attribute
*
attr
,
char
*
buf
)
struct
orangefs_attribute
*
attr
,
char
*
buf
)
{
{
...
@@ -909,7 +866,7 @@ static struct attribute *acache_orangefs_default_attrs[] = {
...
@@ -909,7 +866,7 @@ static struct attribute *acache_orangefs_default_attrs[] = {
};
};
static
struct
kobj_type
acache_orangefs_ktype
=
{
static
struct
kobj_type
acache_orangefs_ktype
=
{
.
sysfs_ops
=
&
acache_
orangefs_sysfs_ops
,
.
sysfs_ops
=
&
orangefs_sysfs_ops
,
.
default_attrs
=
acache_orangefs_default_attrs
,
.
default_attrs
=
acache_orangefs_default_attrs
,
};
};
...
@@ -946,7 +903,7 @@ static struct attribute *capcache_orangefs_default_attrs[] = {
...
@@ -946,7 +903,7 @@ static struct attribute *capcache_orangefs_default_attrs[] = {
};
};
static
struct
kobj_type
capcache_orangefs_ktype
=
{
static
struct
kobj_type
capcache_orangefs_ktype
=
{
.
sysfs_ops
=
&
capcache_
orangefs_sysfs_ops
,
.
sysfs_ops
=
&
orangefs_sysfs_ops
,
.
default_attrs
=
capcache_orangefs_default_attrs
,
.
default_attrs
=
capcache_orangefs_default_attrs
,
};
};
...
@@ -983,7 +940,7 @@ static struct attribute *ccache_orangefs_default_attrs[] = {
...
@@ -983,7 +940,7 @@ static struct attribute *ccache_orangefs_default_attrs[] = {
};
};
static
struct
kobj_type
ccache_orangefs_ktype
=
{
static
struct
kobj_type
ccache_orangefs_ktype
=
{
.
sysfs_ops
=
&
ccache_
orangefs_sysfs_ops
,
.
sysfs_ops
=
&
orangefs_sysfs_ops
,
.
default_attrs
=
ccache_orangefs_default_attrs
,
.
default_attrs
=
ccache_orangefs_default_attrs
,
};
};
...
@@ -1020,7 +977,7 @@ static struct attribute *ncache_orangefs_default_attrs[] = {
...
@@ -1020,7 +977,7 @@ static struct attribute *ncache_orangefs_default_attrs[] = {
};
};
static
struct
kobj_type
ncache_orangefs_ktype
=
{
static
struct
kobj_type
ncache_orangefs_ktype
=
{
.
sysfs_ops
=
&
ncache_
orangefs_sysfs_ops
,
.
sysfs_ops
=
&
orangefs_sysfs_ops
,
.
default_attrs
=
ncache_orangefs_default_attrs
,
.
default_attrs
=
ncache_orangefs_default_attrs
,
};
};
...
@@ -1050,7 +1007,7 @@ static struct attribute *pc_orangefs_default_attrs[] = {
...
@@ -1050,7 +1007,7 @@ static struct attribute *pc_orangefs_default_attrs[] = {
};
};
static
struct
kobj_type
pc_orangefs_ktype
=
{
static
struct
kobj_type
pc_orangefs_ktype
=
{
.
sysfs_ops
=
&
pc_
orangefs_sysfs_ops
,
.
sysfs_ops
=
&
orangefs_sysfs_ops
,
.
default_attrs
=
pc_orangefs_default_attrs
,
.
default_attrs
=
pc_orangefs_default_attrs
,
};
};
...
@@ -1073,7 +1030,7 @@ static struct attribute *stats_orangefs_default_attrs[] = {
...
@@ -1073,7 +1030,7 @@ static struct attribute *stats_orangefs_default_attrs[] = {
};
};
static
struct
kobj_type
stats_orangefs_ktype
=
{
static
struct
kobj_type
stats_orangefs_ktype
=
{
.
sysfs_ops
=
&
stats_
orangefs_sysfs_ops
,
.
sysfs_ops
=
&
orangefs_sysfs_ops
,
.
default_attrs
=
stats_orangefs_default_attrs
,
.
default_attrs
=
stats_orangefs_default_attrs
,
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录