Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
58e8268c
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
58e8268c
编写于
6月 05, 2010
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch ufs to ->evict_inode()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
deee3ce4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
21 deletion
+28
-21
fs/ufs/ialloc.c
fs/ufs/ialloc.c
+0
-2
fs/ufs/inode.c
fs/ufs/inode.c
+26
-17
fs/ufs/super.c
fs/ufs/super.c
+1
-1
fs/ufs/ufs.h
fs/ufs/ufs.h
+1
-1
未找到文件。
fs/ufs/ialloc.c
浏览文件 @
58e8268c
...
...
@@ -94,8 +94,6 @@ void ufs_free_inode (struct inode * inode)
is_directory
=
S_ISDIR
(
inode
->
i_mode
);
clear_inode
(
inode
);
if
(
ubh_isclr
(
UCPI_UBH
(
ucpi
),
ucpi
->
c_iusedoff
,
bit
))
ufs_error
(
sb
,
"ufs_free_inode"
,
"bit already cleared for inode %u"
,
ino
);
else
{
...
...
fs/ufs/inode.c
浏览文件 @
58e8268c
...
...
@@ -911,24 +911,33 @@ int ufs_sync_inode (struct inode *inode)
return
ufs_update_inode
(
inode
,
1
);
}
void
ufs_
delete_inode
(
struct
inode
*
inode
)
void
ufs_
evict_inode
(
struct
inode
*
inode
)
{
loff_t
old_i_size
;
int
want_delete
=
0
;
if
(
!
inode
->
i_nlink
&&
!
is_bad_inode
(
inode
))
want_delete
=
1
;
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
if
(
is_bad_inode
(
inode
))
goto
no_delete
;
/*UFS_I(inode)->i_dtime = CURRENT_TIME;*/
lock_kernel
();
mark_inode_dirty
(
inode
);
ufs_update_inode
(
inode
,
IS_SYNC
(
inode
));
old_i_size
=
inode
->
i_size
;
inode
->
i_size
=
0
;
if
(
inode
->
i_blocks
&&
ufs_truncate
(
inode
,
old_i_size
))
ufs_warning
(
inode
->
i_sb
,
__func__
,
"ufs_truncate failed
\n
"
);
ufs_free_inode
(
inode
);
unlock_kernel
();
return
;
no_delete:
clear_inode
(
inode
);
/* We must guarantee clearing of inode... */
if
(
want_delete
)
{
loff_t
old_i_size
;
/*UFS_I(inode)->i_dtime = CURRENT_TIME;*/
lock_kernel
();
mark_inode_dirty
(
inode
);
ufs_update_inode
(
inode
,
IS_SYNC
(
inode
));
old_i_size
=
inode
->
i_size
;
inode
->
i_size
=
0
;
if
(
inode
->
i_blocks
&&
ufs_truncate
(
inode
,
old_i_size
))
ufs_warning
(
inode
->
i_sb
,
__func__
,
"ufs_truncate failed
\n
"
);
unlock_kernel
();
}
invalidate_inode_buffers
(
inode
);
end_writeback
(
inode
);
if
(
want_delete
)
{
lock_kernel
();
ufs_free_inode
(
inode
);
unlock_kernel
();
}
}
fs/ufs/super.c
浏览文件 @
58e8268c
...
...
@@ -1440,7 +1440,7 @@ static const struct super_operations ufs_super_ops = {
.
alloc_inode
=
ufs_alloc_inode
,
.
destroy_inode
=
ufs_destroy_inode
,
.
write_inode
=
ufs_write_inode
,
.
delete_inode
=
ufs_delete
_inode
,
.
evict_inode
=
ufs_evict
_inode
,
.
put_super
=
ufs_put_super
,
.
write_super
=
ufs_write_super
,
.
sync_fs
=
ufs_sync_fs
,
...
...
fs/ufs/ufs.h
浏览文件 @
58e8268c
...
...
@@ -108,7 +108,7 @@ extern struct inode * ufs_new_inode (struct inode *, int);
extern
struct
inode
*
ufs_iget
(
struct
super_block
*
,
unsigned
long
);
extern
int
ufs_write_inode
(
struct
inode
*
,
struct
writeback_control
*
);
extern
int
ufs_sync_inode
(
struct
inode
*
);
extern
void
ufs_
delete
_inode
(
struct
inode
*
);
extern
void
ufs_
evict
_inode
(
struct
inode
*
);
extern
struct
buffer_head
*
ufs_bread
(
struct
inode
*
,
unsigned
,
int
,
int
*
);
extern
int
ufs_getfrag_block
(
struct
inode
*
inode
,
sector_t
fragment
,
struct
buffer_head
*
bh_result
,
int
create
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录