Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
65555a06
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
65555a06
编写于
10月 25, 2007
作者:
Y
Yan
提交者:
Chris Mason
9月 25, 2008
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Btrfs: Off by one fixes in extent_map.c
Signed-off-by:
N
Chris Mason
<
chris.mason@oracle.com
>
上级
f578d4bd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
5 deletion
+6
-5
fs/btrfs/extent_map.c
fs/btrfs/extent_map.c
+5
-5
fs/btrfs/inode.c
fs/btrfs/inode.c
+1
-0
未找到文件。
fs/btrfs/extent_map.c
浏览文件 @
65555a06
...
...
@@ -2045,7 +2045,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_map_tree *tree,
struct
extent_buffer
*
eb
;
struct
page
*
p
;
struct
address_space
*
mapping
=
tree
->
mapping
;
int
uptodate
=
0
;
int
uptodate
=
1
;
eb
=
__alloc_extent_buffer
(
tree
,
start
,
len
,
mask
);
if
(
!
eb
||
IS_ERR
(
eb
))
...
...
@@ -2197,7 +2197,7 @@ int clear_extent_buffer_dirty(struct extent_map_tree *tree,
*/
if
((
i
==
0
&&
(
eb
->
start
&
(
PAGE_CACHE_SIZE
-
1
)))
||
((
i
==
num_pages
-
1
)
&&
((
eb
->
start
+
eb
->
len
-
1
)
&
(
PAGE_CACHE_SIZE
-
1
))))
{
((
eb
->
start
+
eb
->
len
)
&
(
PAGE_CACHE_SIZE
-
1
))))
{
start
=
page
->
index
<<
PAGE_CACHE_SHIFT
;
end
=
start
+
PAGE_CACHE_SIZE
-
1
;
if
(
test_range_bit
(
tree
,
start
,
end
,
...
...
@@ -2265,7 +2265,7 @@ int set_extent_buffer_uptodate(struct extent_map_tree *tree,
page
=
extent_buffer_page
(
eb
,
i
);
if
((
i
==
0
&&
(
eb
->
start
&
(
PAGE_CACHE_SIZE
-
1
)))
||
((
i
==
num_pages
-
1
)
&&
((
eb
->
start
+
eb
->
len
-
1
)
&
(
PAGE_CACHE_SIZE
-
1
))))
{
((
eb
->
start
+
eb
->
len
)
&
(
PAGE_CACHE_SIZE
-
1
))))
{
check_page_uptodate
(
tree
,
page
);
continue
;
}
...
...
@@ -2401,7 +2401,7 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start,
struct
page
*
p
;
size_t
start_offset
=
eb
->
start
&
((
u64
)
PAGE_CACHE_SIZE
-
1
);
unsigned
long
i
=
(
start_offset
+
start
)
>>
PAGE_CACHE_SHIFT
;
unsigned
long
end_i
=
(
start_offset
+
start
+
min_len
)
>>
unsigned
long
end_i
=
(
start_offset
+
start
+
min_len
-
1
)
>>
PAGE_CACHE_SHIFT
;
if
(
i
!=
end_i
)
...
...
@@ -2414,7 +2414,7 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start,
offset
=
0
;
*
map_start
=
(
i
<<
PAGE_CACHE_SHIFT
)
-
start_offset
;
}
if
(
start
+
min_len
>
=
eb
->
len
)
{
if
(
start
+
min_len
>
eb
->
len
)
{
printk
(
"bad mapping eb start %Lu len %lu, wanted %lu %lu
\n
"
,
eb
->
start
,
eb
->
len
,
start
,
min_len
);
WARN_ON
(
1
);
}
...
...
fs/btrfs/inode.c
浏览文件 @
65555a06
...
...
@@ -616,6 +616,7 @@ static int btrfs_truncate_in_trans(struct btrfs_trans_handle *trans,
break
;
}
btrfs_set_key_type
(
&
key
,
found_type
);
btrfs_release_path
(
root
,
path
);
continue
;
}
if
(
found_key
.
offset
>=
inode
->
i_size
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录