Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
0930fcc1
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看板
提交
0930fcc1
编写于
6月 07, 2010
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
convert ext4 to ->evict_inode()
pretty much brute-force... Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
7da08fd1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
10 deletion
+16
-10
fs/ext4/ext4.h
fs/ext4/ext4.h
+2
-1
fs/ext4/ialloc.c
fs/ext4/ialloc.c
+1
-1
fs/ext4/inode.c
fs/ext4/inode.c
+8
-3
fs/ext4/super.c
fs/ext4/super.c
+5
-5
未找到文件。
fs/ext4/ext4.h
浏览文件 @
0930fcc1
...
...
@@ -1571,7 +1571,8 @@ extern int ext4_write_inode(struct inode *, struct writeback_control *);
extern
int
ext4_setattr
(
struct
dentry
*
,
struct
iattr
*
);
extern
int
ext4_getattr
(
struct
vfsmount
*
mnt
,
struct
dentry
*
dentry
,
struct
kstat
*
stat
);
extern
void
ext4_delete_inode
(
struct
inode
*
);
extern
void
ext4_evict_inode
(
struct
inode
*
);
extern
void
ext4_clear_inode
(
struct
inode
*
);
extern
int
ext4_sync_inode
(
handle_t
*
,
struct
inode
*
);
extern
void
ext4_dirty_inode
(
struct
inode
*
);
extern
int
ext4_change_inode_journal_flag
(
struct
inode
*
,
int
);
...
...
fs/ext4/ialloc.c
浏览文件 @
0930fcc1
...
...
@@ -222,7 +222,7 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
is_directory
=
S_ISDIR
(
inode
->
i_mode
);
/* Do this BEFORE marking the inode not in use or returning an error */
clear_inode
(
inode
);
ext4_
clear_inode
(
inode
);
es
=
EXT4_SB
(
sb
)
->
s_es
;
if
(
ino
<
EXT4_FIRST_INO
(
sb
)
||
ino
>
le32_to_cpu
(
es
->
s_inodes_count
))
{
...
...
fs/ext4/inode.c
浏览文件 @
0930fcc1
...
...
@@ -167,11 +167,16 @@ int ext4_truncate_restart_trans(handle_t *handle, struct inode *inode,
/*
* Called at the last iput() if i_nlink is zero.
*/
void
ext4_
delete
_inode
(
struct
inode
*
inode
)
void
ext4_
evict
_inode
(
struct
inode
*
inode
)
{
handle_t
*
handle
;
int
err
;
if
(
inode
->
i_nlink
)
{
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
goto
no_delete
;
}
if
(
!
is_bad_inode
(
inode
))
dquot_initialize
(
inode
);
...
...
@@ -245,13 +250,13 @@ void ext4_delete_inode(struct inode *inode)
*/
if
(
ext4_mark_inode_dirty
(
handle
,
inode
))
/* If that failed, just do the required in-core inode clear. */
clear_inode
(
inode
);
ext4_
clear_inode
(
inode
);
else
ext4_free_inode
(
handle
,
inode
);
ext4_journal_stop
(
handle
);
return
;
no_delete:
clear_inode
(
inode
);
/* We must guarantee clearing of inode... */
ext4_
clear_inode
(
inode
);
/* We must guarantee clearing of inode... */
}
typedef
struct
{
...
...
fs/ext4/super.c
浏览文件 @
0930fcc1
...
...
@@ -813,8 +813,10 @@ static void destroy_inodecache(void)
kmem_cache_destroy
(
ext4_inode_cachep
);
}
static
void
ext4_clear_inode
(
struct
inode
*
inode
)
void
ext4_clear_inode
(
struct
inode
*
inode
)
{
invalidate_inode_buffers
(
inode
);
end_writeback
(
inode
);
dquot_drop
(
inode
);
ext4_discard_preallocations
(
inode
);
if
(
EXT4_JOURNAL
(
inode
))
...
...
@@ -1100,14 +1102,13 @@ static const struct super_operations ext4_sops = {
.
destroy_inode
=
ext4_destroy_inode
,
.
write_inode
=
ext4_write_inode
,
.
dirty_inode
=
ext4_dirty_inode
,
.
delete_inode
=
ext4_delete
_inode
,
.
evict_inode
=
ext4_evict
_inode
,
.
put_super
=
ext4_put_super
,
.
sync_fs
=
ext4_sync_fs
,
.
freeze_fs
=
ext4_freeze
,
.
unfreeze_fs
=
ext4_unfreeze
,
.
statfs
=
ext4_statfs
,
.
remount_fs
=
ext4_remount
,
.
clear_inode
=
ext4_clear_inode
,
.
show_options
=
ext4_show_options
,
#ifdef CONFIG_QUOTA
.
quota_read
=
ext4_quota_read
,
...
...
@@ -1121,12 +1122,11 @@ static const struct super_operations ext4_nojournal_sops = {
.
destroy_inode
=
ext4_destroy_inode
,
.
write_inode
=
ext4_write_inode
,
.
dirty_inode
=
ext4_dirty_inode
,
.
delete_inode
=
ext4_delete
_inode
,
.
evict_inode
=
ext4_evict
_inode
,
.
write_super
=
ext4_write_super
,
.
put_super
=
ext4_put_super
,
.
statfs
=
ext4_statfs
,
.
remount_fs
=
ext4_remount
,
.
clear_inode
=
ext4_clear_inode
,
.
show_options
=
ext4_show_options
,
#ifdef CONFIG_QUOTA
.
quota_read
=
ext4_quota_read
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录