Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
22341d8f
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
22341d8f
编写于
5月 10, 2016
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
befs: constify stuff a bit
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
e8991089
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
34 addition
and
31 deletion
+34
-31
fs/befs/befs.h
fs/befs/befs.h
+2
-2
fs/befs/btree.c
fs/befs/btree.c
+8
-8
fs/befs/btree.h
fs/befs/btree.h
+2
-2
fs/befs/datastream.c
fs/befs/datastream.c
+14
-12
fs/befs/datastream.h
fs/befs/datastream.h
+6
-5
fs/befs/linuxvfs.c
fs/befs/linuxvfs.c
+2
-2
未找到文件。
fs/befs/befs.h
浏览文件 @
22341d8f
...
...
@@ -116,7 +116,7 @@ BEFS_I(const struct inode *inode)
}
static
inline
befs_blocknr_t
iaddr2blockno
(
struct
super_block
*
sb
,
befs_inode_addr
*
iaddr
)
iaddr2blockno
(
struct
super_block
*
sb
,
const
befs_inode_addr
*
iaddr
)
{
return
((
iaddr
->
allocation_group
<<
BEFS_SB
(
sb
)
->
ag_shift
)
+
iaddr
->
start
);
...
...
@@ -141,7 +141,7 @@ befs_iaddrs_per_block(struct super_block *sb)
}
static
inline
int
befs_iaddr_is_empty
(
befs_inode_addr
*
iaddr
)
befs_iaddr_is_empty
(
const
befs_inode_addr
*
iaddr
)
{
return
(
!
iaddr
->
allocation_group
)
&&
(
!
iaddr
->
start
)
&&
(
!
iaddr
->
len
);
}
...
...
fs/befs/btree.c
浏览文件 @
22341d8f
...
...
@@ -88,15 +88,15 @@ struct befs_btree_node {
static
const
befs_off_t
befs_bt_inval
=
0xffffffffffffffffULL
;
/* local functions */
static
int
befs_btree_seekleaf
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
static
int
befs_btree_seekleaf
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
befs_btree_super
*
bt_super
,
struct
befs_btree_node
*
this_node
,
befs_off_t
*
node_off
);
static
int
befs_bt_read_super
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
static
int
befs_bt_read_super
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
befs_btree_super
*
sup
);
static
int
befs_bt_read_node
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
static
int
befs_bt_read_node
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
struct
befs_btree_node
*
node
,
befs_off_t
node_off
);
...
...
@@ -134,7 +134,7 @@ static int befs_compare_strings(const void *key1, int keylen1,
* On failure, BEFS_ERR is returned.
*/
static
int
befs_bt_read_super
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
befs_bt_read_super
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
befs_btree_super
*
sup
)
{
struct
buffer_head
*
bh
;
...
...
@@ -193,7 +193,7 @@ befs_bt_read_super(struct super_block *sb, befs_data_stream * ds,
*/
static
int
befs_bt_read_node
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
befs_bt_read_node
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
struct
befs_btree_node
*
node
,
befs_off_t
node_off
)
{
uint
off
=
0
;
...
...
@@ -247,7 +247,7 @@ befs_bt_read_node(struct super_block *sb, befs_data_stream * ds,
* actuall value stored with the key.
*/
int
befs_btree_find
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
befs_btree_find
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
const
char
*
key
,
befs_off_t
*
value
)
{
struct
befs_btree_node
*
this_node
;
...
...
@@ -416,7 +416,7 @@ befs_find_key(struct super_block *sb, struct befs_btree_node *node,
* until the (key_no)th key is found or the tree is out of keys.
*/
int
befs_btree_read
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
befs_btree_read
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
loff_t
key_no
,
size_t
bufsize
,
char
*
keybuf
,
size_t
*
keysize
,
befs_off_t
*
value
)
{
...
...
@@ -548,7 +548,7 @@ befs_btree_read(struct super_block *sb, befs_data_stream * ds,
* Also checks for an empty tree. If there are no keys, returns BEFS_BT_EMPTY.
*/
static
int
befs_btree_seekleaf
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
befs_btree_seekleaf
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
befs_btree_super
*
bt_super
,
struct
befs_btree_node
*
this_node
,
befs_off_t
*
node_off
)
...
...
fs/befs/btree.h
浏览文件 @
22341d8f
...
...
@@ -4,10 +4,10 @@
*/
int
befs_btree_find
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
int
befs_btree_find
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
const
char
*
key
,
befs_off_t
*
value
);
int
befs_btree_read
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
int
befs_btree_read
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
loff_t
key_no
,
size_t
bufsize
,
char
*
keybuf
,
size_t
*
keysize
,
befs_off_t
*
value
);
fs/befs/datastream.c
浏览文件 @
22341d8f
...
...
@@ -21,16 +21,16 @@
const
befs_inode_addr
BAD_IADDR
=
{
0
,
0
,
0
};
static
int
befs_find_brun_direct
(
struct
super_block
*
sb
,
befs_data_stream
*
data
,
const
befs_data_stream
*
data
,
befs_blocknr_t
blockno
,
befs_block_run
*
run
);
static
int
befs_find_brun_indirect
(
struct
super_block
*
sb
,
befs_data_stream
*
data
,
const
befs_data_stream
*
data
,
befs_blocknr_t
blockno
,
befs_block_run
*
run
);
static
int
befs_find_brun_dblindirect
(
struct
super_block
*
sb
,
befs_data_stream
*
data
,
const
befs_data_stream
*
data
,
befs_blocknr_t
blockno
,
befs_block_run
*
run
);
...
...
@@ -45,7 +45,7 @@ static int befs_find_brun_dblindirect(struct super_block *sb,
* if you don't need to know offset just set @off = NULL.
*/
struct
buffer_head
*
befs_read_datastream
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
befs_read_datastream
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
befs_off_t
pos
,
uint
*
off
)
{
struct
buffer_head
*
bh
=
NULL
;
...
...
@@ -87,7 +87,7 @@ befs_read_datastream(struct super_block *sb, befs_data_stream * ds,
* 2001-11-15 Will Dyson
*/
int
befs_fblock2brun
(
struct
super_block
*
sb
,
befs_data_stream
*
data
,
befs_fblock2brun
(
struct
super_block
*
sb
,
const
befs_data_stream
*
data
,
befs_blocknr_t
fblock
,
befs_block_run
*
run
)
{
int
err
;
...
...
@@ -122,8 +122,8 @@ befs_fblock2brun(struct super_block *sb, befs_data_stream * data,
* Returns the number of bytes read
*/
size_t
befs_read_lsymlink
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
void
*
buff
,
befs_off_t
len
)
befs_read_lsymlink
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
,
void
*
buff
,
befs_off_t
len
)
{
befs_off_t
bytes_read
=
0
;
/* bytes readed */
u16
plen
;
...
...
@@ -163,7 +163,7 @@ befs_read_lsymlink(struct super_block * sb, befs_data_stream * ds, void *buff,
*/
befs_blocknr_t
befs_count_blocks
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
)
befs_count_blocks
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
)
{
befs_blocknr_t
blocks
;
befs_blocknr_t
datablocks
;
/* File data blocks */
...
...
@@ -243,11 +243,11 @@ befs_count_blocks(struct super_block * sb, befs_data_stream * ds)
2001-11-15 Will Dyson
*/
static
int
befs_find_brun_direct
(
struct
super_block
*
sb
,
befs_data_stream
*
data
,
befs_find_brun_direct
(
struct
super_block
*
sb
,
const
befs_data_stream
*
data
,
befs_blocknr_t
blockno
,
befs_block_run
*
run
)
{
int
i
;
befs_block_run
*
array
=
data
->
direct
;
const
befs_block_run
*
array
=
data
->
direct
;
befs_blocknr_t
sum
;
befs_blocknr_t
max_block
=
data
->
max_direct_range
>>
BEFS_SB
(
sb
)
->
block_shift
;
...
...
@@ -304,7 +304,8 @@ befs_find_brun_direct(struct super_block *sb, befs_data_stream * data,
*/
static
int
befs_find_brun_indirect
(
struct
super_block
*
sb
,
befs_data_stream
*
data
,
befs_blocknr_t
blockno
,
const
befs_data_stream
*
data
,
befs_blocknr_t
blockno
,
befs_block_run
*
run
)
{
int
i
,
j
;
...
...
@@ -412,7 +413,8 @@ befs_find_brun_indirect(struct super_block *sb,
*/
static
int
befs_find_brun_dblindirect
(
struct
super_block
*
sb
,
befs_data_stream
*
data
,
befs_blocknr_t
blockno
,
const
befs_data_stream
*
data
,
befs_blocknr_t
blockno
,
befs_block_run
*
run
)
{
int
dblindir_indx
;
...
...
fs/befs/datastream.h
浏览文件 @
22341d8f
...
...
@@ -4,16 +4,17 @@
*/
struct
buffer_head
*
befs_read_datastream
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
,
befs_off_t
po
s
,
uint
*
off
);
const
befs_data_stream
*
d
s
,
befs_off_t
pos
,
uint
*
off
);
int
befs_fblock2brun
(
struct
super_block
*
sb
,
befs_data_stream
*
data
,
int
befs_fblock2brun
(
struct
super_block
*
sb
,
const
befs_data_stream
*
data
,
befs_blocknr_t
fblock
,
befs_block_run
*
run
);
size_t
befs_read_lsymlink
(
struct
super_block
*
sb
,
befs_data_stream
*
data
,
size_t
befs_read_lsymlink
(
struct
super_block
*
sb
,
const
befs_data_stream
*
data
,
void
*
buff
,
befs_off_t
len
);
befs_blocknr_t
befs_count_blocks
(
struct
super_block
*
sb
,
befs_data_stream
*
ds
);
befs_blocknr_t
befs_count_blocks
(
struct
super_block
*
sb
,
const
befs_data_stream
*
ds
);
extern
const
befs_inode_addr
BAD_IADDR
;
fs/befs/linuxvfs.c
浏览文件 @
22341d8f
...
...
@@ -157,7 +157,7 @@ befs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
{
struct
inode
*
inode
=
NULL
;
struct
super_block
*
sb
=
dir
->
i_sb
;
befs_data_stream
*
ds
=
&
BEFS_I
(
dir
)
->
i_data
.
ds
;
const
befs_data_stream
*
ds
=
&
BEFS_I
(
dir
)
->
i_data
.
ds
;
befs_off_t
offset
;
int
ret
;
int
utfnamelen
;
...
...
@@ -207,7 +207,7 @@ befs_readdir(struct file *file, struct dir_context *ctx)
{
struct
inode
*
inode
=
file_inode
(
file
);
struct
super_block
*
sb
=
inode
->
i_sb
;
befs_data_stream
*
ds
=
&
BEFS_I
(
inode
)
->
i_data
.
ds
;
const
befs_data_stream
*
ds
=
&
BEFS_I
(
inode
)
->
i_data
.
ds
;
befs_off_t
value
;
int
result
;
size_t
keysize
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录