Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a01ac532
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
a01ac532
编写于
9月 08, 2005
作者:
A
Anton Altaparmakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NTFS: Fix page_has_buffers()/page_buffers() handling in fs/ntfs/aops.c.
Signed-off-by:
N
Anton Altaparmakov
<
aia21@cantab.net
>
上级
311120ec
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
17 deletion
+22
-17
fs/ntfs/ChangeLog
fs/ntfs/ChangeLog
+1
-0
fs/ntfs/aops.c
fs/ntfs/aops.c
+21
-17
未找到文件。
fs/ntfs/ChangeLog
浏览文件 @
a01ac532
...
...
@@ -85,6 +85,7 @@ ToDo/Notes:
removal of the get_bh()/put_bh() pairs for each buffer.
- Fix fs/ntfs/aops.c::ntfs_{read,write}_block() to handle the case
where a concurrent truncate has truncated the runlist under our feet.
- Fix page_has_buffers()/page_buffers() handling in fs/ntfs/aops.c.
2.1.23 - Implement extension of resident files and make writing safe as well as
many bug fixes, cleanups, and enhancements...
...
...
fs/ntfs/aops.c
浏览文件 @
a01ac532
...
...
@@ -185,13 +185,15 @@ static int ntfs_read_block(struct page *page)
blocksize_bits
=
VFS_I
(
ni
)
->
i_blkbits
;
blocksize
=
1
<<
blocksize_bits
;
if
(
!
page_has_buffers
(
page
))
if
(
!
page_has_buffers
(
page
))
{
create_empty_buffers
(
page
,
blocksize
,
0
);
bh
=
head
=
page_buffers
(
page
);
if
(
unlikely
(
!
bh
))
{
unlock_page
(
page
)
;
return
-
ENOMEM
;
if
(
unlikely
(
!
page_has_buffers
(
page
)))
{
unlock_page
(
page
);
return
-
ENOMEM
;
}
}
bh
=
head
=
page_buffers
(
page
);
BUG_ON
(
!
bh
);
iblock
=
(
s64
)
page
->
index
<<
(
PAGE_CACHE_SHIFT
-
blocksize_bits
);
read_lock_irqsave
(
&
ni
->
size_lock
,
flags
);
...
...
@@ -530,19 +532,21 @@ static int ntfs_write_block(struct page *page, struct writeback_control *wbc)
BUG_ON
(
!
PageUptodate
(
page
));
create_empty_buffers
(
page
,
blocksize
,
(
1
<<
BH_Uptodate
)
|
(
1
<<
BH_Dirty
));
if
(
unlikely
(
!
page_has_buffers
(
page
)))
{
ntfs_warning
(
vol
->
sb
,
"Error allocating page "
"buffers. Redirtying page so we try "
"again later."
);
/*
* Put the page back on mapping->dirty_pages, but leave
* its buffers' dirty state as-is.
*/
redirty_page_for_writepage
(
wbc
,
page
);
unlock_page
(
page
);
return
0
;
}
}
bh
=
head
=
page_buffers
(
page
);
if
(
unlikely
(
!
bh
))
{
ntfs_warning
(
vol
->
sb
,
"Error allocating page buffers. "
"Redirtying page so we try again later."
);
/*
* Put the page back on mapping->dirty_pages, but leave its
* buffer's dirty state as-is.
*/
redirty_page_for_writepage
(
wbc
,
page
);
unlock_page
(
page
);
return
0
;
}
BUG_ON
(
!
bh
);
/* NOTE: Different naming scheme to ntfs_read_block()! */
...
...
@@ -910,7 +914,6 @@ static int ntfs_write_mst_block(struct page *page,
sync
=
(
wbc
->
sync_mode
==
WB_SYNC_ALL
);
/* Make sure we have mapped buffers. */
BUG_ON
(
!
page_has_buffers
(
page
));
bh
=
head
=
page_buffers
(
page
);
BUG_ON
(
!
bh
);
...
...
@@ -2397,6 +2400,7 @@ void mark_ntfs_record_dirty(struct page *page, const unsigned int ofs) {
buffers_to_free
=
bh
;
}
bh
=
head
=
page_buffers
(
page
);
BUG_ON
(
!
bh
);
do
{
bh_ofs
=
bh_offset
(
bh
);
if
(
bh_ofs
+
bh_size
<=
ofs
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录