Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
c38012da
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看板
提交
c38012da
编写于
12月 30, 2008
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
nfsd race fixes: ext3
ext3 analog of the previous patch Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
41080b5a
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
19 addition
and
2 deletion
+19
-2
fs/ext3/ialloc.c
fs/ext3/ialloc.c
+5
-1
fs/ext3/namei.c
fs/ext3/namei.c
+14
-1
未找到文件。
fs/ext3/ialloc.c
浏览文件 @
c38012da
...
...
@@ -579,7 +579,10 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode)
ext3_set_inode_flags
(
inode
);
if
(
IS_DIRSYNC
(
inode
))
handle
->
h_sync
=
1
;
insert_inode_hash
(
inode
);
if
(
insert_inode_locked
(
inode
)
<
0
)
{
err
=
-
EINVAL
;
goto
fail_drop
;
}
spin_lock
(
&
sbi
->
s_next_gen_lock
);
inode
->
i_generation
=
sbi
->
s_next_generation
++
;
spin_unlock
(
&
sbi
->
s_next_gen_lock
);
...
...
@@ -627,6 +630,7 @@ struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode)
DQUOT_DROP
(
inode
);
inode
->
i_flags
|=
S_NOQUOTA
;
inode
->
i_nlink
=
0
;
unlock_new_inode
(
inode
);
iput
(
inode
);
brelse
(
bitmap_bh
);
return
ERR_PTR
(
err
);
...
...
fs/ext3/namei.c
浏览文件 @
c38012da
...
...
@@ -1652,9 +1652,11 @@ static int ext3_add_nondir(handle_t *handle,
if
(
!
err
)
{
ext3_mark_inode_dirty
(
handle
,
inode
);
d_instantiate
(
dentry
,
inode
);
unlock_new_inode
(
inode
);
return
0
;
}
drop_nlink
(
inode
);
unlock_new_inode
(
inode
);
iput
(
inode
);
return
err
;
}
...
...
@@ -1765,6 +1767,7 @@ static int ext3_mkdir(struct inode * dir, struct dentry * dentry, int mode)
dir_block
=
ext3_bread
(
handle
,
inode
,
0
,
1
,
&
err
);
if
(
!
dir_block
)
{
drop_nlink
(
inode
);
/* is this nlink == 0? */
unlock_new_inode
(
inode
);
ext3_mark_inode_dirty
(
handle
,
inode
);
iput
(
inode
);
goto
out_stop
;
...
...
@@ -1792,6 +1795,7 @@ static int ext3_mkdir(struct inode * dir, struct dentry * dentry, int mode)
err
=
ext3_add_entry
(
handle
,
dentry
,
inode
);
if
(
err
)
{
inode
->
i_nlink
=
0
;
unlock_new_inode
(
inode
);
ext3_mark_inode_dirty
(
handle
,
inode
);
iput
(
inode
);
goto
out_stop
;
...
...
@@ -1800,6 +1804,7 @@ static int ext3_mkdir(struct inode * dir, struct dentry * dentry, int mode)
ext3_update_dx_flag
(
dir
);
ext3_mark_inode_dirty
(
handle
,
dir
);
d_instantiate
(
dentry
,
inode
);
unlock_new_inode
(
inode
);
out_stop:
ext3_journal_stop
(
handle
);
if
(
err
==
-
ENOSPC
&&
ext3_should_retry_alloc
(
dir
->
i_sb
,
&
retries
))
...
...
@@ -2174,6 +2179,7 @@ static int ext3_symlink (struct inode * dir,
mapping_gfp_mask
(
inode
->
i_mapping
)
&
~
__GFP_FS
);
if
(
err
)
{
drop_nlink
(
inode
);
unlock_new_inode
(
inode
);
ext3_mark_inode_dirty
(
handle
,
inode
);
iput
(
inode
);
goto
out_stop
;
...
...
@@ -2221,7 +2227,14 @@ static int ext3_link (struct dentry * old_dentry,
inc_nlink
(
inode
);
atomic_inc
(
&
inode
->
i_count
);
err
=
ext3_add_nondir
(
handle
,
dentry
,
inode
);
err
=
ext3_add_entry
(
handle
,
dentry
,
inode
);
if
(
!
err
)
{
ext3_mark_inode_dirty
(
handle
,
inode
);
d_instantiate
(
dentry
,
inode
);
}
else
{
drop_nlink
(
inode
);
iput
(
inode
);
}
ext3_journal_stop
(
handle
);
if
(
err
==
-
ENOSPC
&&
ext3_should_retry_alloc
(
dir
->
i_sb
,
&
retries
))
goto
retry
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录