Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
fb1c2d82
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fb1c2d82
编写于
5月 03, 2013
作者:
J
Jan Kara
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for_next' into for_linus
上级
35e5cbc0
8bb9da94
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
8 deletion
+17
-8
fs/ext3/inode.c
fs/ext3/inode.c
+2
-1
fs/jbd/journal.c
fs/jbd/journal.c
+14
-5
fs/jbd/transaction.c
fs/jbd/transaction.c
+0
-1
include/linux/jbd.h
include/linux/jbd.h
+1
-1
未找到文件。
fs/ext3/inode.c
浏览文件 @
fb1c2d82
...
...
@@ -218,7 +218,8 @@ void ext3_evict_inode (struct inode *inode)
*/
if
(
inode
->
i_nlink
&&
ext3_should_journal_data
(
inode
)
&&
EXT3_SB
(
inode
->
i_sb
)
->
s_journal
&&
(
S_ISLNK
(
inode
->
i_mode
)
||
S_ISREG
(
inode
->
i_mode
)))
{
(
S_ISLNK
(
inode
->
i_mode
)
||
S_ISREG
(
inode
->
i_mode
))
&&
inode
->
i_ino
!=
EXT3_JOURNAL_INO
)
{
tid_t
commit_tid
=
atomic_read
(
&
ei
->
i_datasync_tid
);
journal_t
*
journal
=
EXT3_SB
(
inode
->
i_sb
)
->
s_journal
;
...
...
fs/jbd/journal.c
浏览文件 @
fb1c2d82
...
...
@@ -564,6 +564,16 @@ int log_wait_commit(journal_t *journal, tid_t tid)
spin_unlock
(
&
journal
->
j_state_lock
);
#endif
spin_lock
(
&
journal
->
j_state_lock
);
/*
* Not running or committing trans? Must be already committed. This
* saves us from waiting for a *long* time when tid overflows.
*/
if
(
!
((
journal
->
j_running_transaction
&&
journal
->
j_running_transaction
->
t_tid
==
tid
)
||
(
journal
->
j_committing_transaction
&&
journal
->
j_committing_transaction
->
t_tid
==
tid
)))
goto
out_unlock
;
if
(
!
tid_geq
(
journal
->
j_commit_waited
,
tid
))
journal
->
j_commit_waited
=
tid
;
while
(
tid_gt
(
tid
,
journal
->
j_commit_sequence
))
{
...
...
@@ -575,6 +585,7 @@ int log_wait_commit(journal_t *journal, tid_t tid)
!
tid_gt
(
tid
,
journal
->
j_commit_sequence
));
spin_lock
(
&
journal
->
j_state_lock
);
}
out_unlock:
spin_unlock
(
&
journal
->
j_state_lock
);
if
(
unlikely
(
is_journal_aborted
(
journal
)))
{
...
...
@@ -1845,7 +1856,7 @@ static struct journal_head *journal_alloc_journal_head(void)
#ifdef CONFIG_JBD_DEBUG
atomic_inc
(
&
nr_journal_heads
);
#endif
ret
=
kmem_cache_alloc
(
journal_head_cache
,
GFP_NOFS
);
ret
=
kmem_cache_
z
alloc
(
journal_head_cache
,
GFP_NOFS
);
if
(
ret
==
NULL
)
{
jbd_debug
(
1
,
"out of memory for journal_head
\n
"
);
printk_ratelimited
(
KERN_NOTICE
"ENOMEM in %s, retrying.
\n
"
,
...
...
@@ -1853,7 +1864,7 @@ static struct journal_head *journal_alloc_journal_head(void)
while
(
ret
==
NULL
)
{
yield
();
ret
=
kmem_cache_alloc
(
journal_head_cache
,
GFP_NOFS
);
ret
=
kmem_cache_
z
alloc
(
journal_head_cache
,
GFP_NOFS
);
}
}
return
ret
;
...
...
@@ -1915,10 +1926,8 @@ struct journal_head *journal_add_journal_head(struct buffer_head *bh)
struct
journal_head
*
new_jh
=
NULL
;
repeat:
if
(
!
buffer_jbd
(
bh
))
{
if
(
!
buffer_jbd
(
bh
))
new_jh
=
journal_alloc_journal_head
();
memset
(
new_jh
,
0
,
sizeof
(
*
new_jh
));
}
jbd_lock_bh_journal_head
(
bh
);
if
(
buffer_jbd
(
bh
))
{
...
...
fs/jbd/transaction.c
浏览文件 @
fb1c2d82
...
...
@@ -245,7 +245,6 @@ static handle_t *new_handle(int nblocks)
handle_t
*
handle
=
jbd_alloc_handle
(
GFP_NOFS
);
if
(
!
handle
)
return
NULL
;
memset
(
handle
,
0
,
sizeof
(
*
handle
));
handle
->
h_buffer_credits
=
nblocks
;
handle
->
h_ref
=
1
;
...
...
include/linux/jbd.h
浏览文件 @
fb1c2d82
...
...
@@ -887,7 +887,7 @@ extern struct kmem_cache *jbd_handle_cache;
static
inline
handle_t
*
jbd_alloc_handle
(
gfp_t
gfp_flags
)
{
return
kmem_cache_alloc
(
jbd_handle_cache
,
gfp_flags
);
return
kmem_cache_
z
alloc
(
jbd_handle_cache
,
gfp_flags
);
}
static
inline
void
jbd_free_handle
(
handle_t
*
handle
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录