Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
6fd1e5c9
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看板
提交
6fd1e5c9
编写于
6月 07, 2010
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
convert nilfs2 to ->evict_inode()
[folded build fix from sfr] Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
4ec70c9b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
24 deletion
+26
-24
fs/nilfs2/inode.c
fs/nilfs2/inode.c
+24
-4
fs/nilfs2/nilfs.h
fs/nilfs2/nilfs.h
+1
-1
fs/nilfs2/super.c
fs/nilfs2/super.c
+1
-19
未找到文件。
fs/nilfs2/inode.c
浏览文件 @
6fd1e5c9
...
...
@@ -27,6 +27,7 @@
#include <linux/writeback.h>
#include <linux/uio.h>
#include "nilfs.h"
#include "btnode.h"
#include "segment.h"
#include "page.h"
#include "mdt.h"
...
...
@@ -354,7 +355,6 @@ void nilfs_free_inode(struct inode *inode)
struct
super_block
*
sb
=
inode
->
i_sb
;
struct
nilfs_sb_info
*
sbi
=
NILFS_SB
(
sb
);
clear_inode
(
inode
);
/* XXX: check error code? Is there any thing I can do? */
(
void
)
nilfs_ifile_delete_inode
(
sbi
->
s_ifile
,
inode
->
i_ino
);
atomic_dec
(
&
sbi
->
s_inodes_count
);
...
...
@@ -614,16 +614,34 @@ void nilfs_truncate(struct inode *inode)
But truncate has no return value. */
}
void
nilfs_delete_inode
(
struct
inode
*
inode
)
static
void
nilfs_clear_inode
(
struct
inode
*
inode
)
{
struct
nilfs_inode_info
*
ii
=
NILFS_I
(
inode
);
/*
* Free resources allocated in nilfs_read_inode(), here.
*/
BUG_ON
(
!
list_empty
(
&
ii
->
i_dirty
));
brelse
(
ii
->
i_bh
);
ii
->
i_bh
=
NULL
;
if
(
test_bit
(
NILFS_I_BMAP
,
&
ii
->
i_state
))
nilfs_bmap_clear
(
ii
->
i_bmap
);
nilfs_btnode_cache_clear
(
&
ii
->
i_btnode_cache
);
}
void
nilfs_evict_inode
(
struct
inode
*
inode
)
{
struct
nilfs_transaction_info
ti
;
struct
super_block
*
sb
=
inode
->
i_sb
;
struct
nilfs_inode_info
*
ii
=
NILFS_I
(
inode
);
if
(
unlikely
(
is_bad_inode
(
inode
)))
{
if
(
inode
->
i_nlink
||
unlikely
(
is_bad_inode
(
inode
)))
{
if
(
inode
->
i_data
.
nrpages
)
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
clear_inode
(
inode
);
end_writeback
(
inode
);
nilfs_clear_inode
(
inode
);
return
;
}
nilfs_transaction_begin
(
sb
,
&
ti
,
0
);
/* never fails */
...
...
@@ -633,6 +651,8 @@ void nilfs_delete_inode(struct inode *inode)
nilfs_truncate_bmap
(
ii
,
0
);
nilfs_mark_inode_dirty
(
inode
);
end_writeback
(
inode
);
nilfs_clear_inode
(
inode
);
nilfs_free_inode
(
inode
);
/* nilfs_free_inode() marks inode buffer dirty */
if
(
IS_SYNC
(
inode
))
...
...
fs/nilfs2/nilfs.h
浏览文件 @
6fd1e5c9
...
...
@@ -245,7 +245,7 @@ extern void nilfs_write_inode_common(struct inode *, struct nilfs_inode *, int);
extern
struct
inode
*
nilfs_iget
(
struct
super_block
*
,
unsigned
long
);
extern
void
nilfs_update_inode
(
struct
inode
*
,
struct
buffer_head
*
);
extern
void
nilfs_truncate
(
struct
inode
*
);
extern
void
nilfs_
delete
_inode
(
struct
inode
*
);
extern
void
nilfs_
evict
_inode
(
struct
inode
*
);
extern
int
nilfs_setattr
(
struct
dentry
*
,
struct
iattr
*
);
extern
int
nilfs_load_inode_block
(
struct
nilfs_sb_info
*
,
struct
inode
*
,
struct
buffer_head
**
);
...
...
fs/nilfs2/super.c
浏览文件 @
6fd1e5c9
...
...
@@ -159,23 +159,6 @@ void nilfs_destroy_inode(struct inode *inode)
kmem_cache_free
(
nilfs_inode_cachep
,
NILFS_I
(
inode
));
}
static
void
nilfs_clear_inode
(
struct
inode
*
inode
)
{
struct
nilfs_inode_info
*
ii
=
NILFS_I
(
inode
);
/*
* Free resources allocated in nilfs_read_inode(), here.
*/
BUG_ON
(
!
list_empty
(
&
ii
->
i_dirty
));
brelse
(
ii
->
i_bh
);
ii
->
i_bh
=
NULL
;
if
(
test_bit
(
NILFS_I_BMAP
,
&
ii
->
i_state
))
nilfs_bmap_clear
(
ii
->
i_bmap
);
nilfs_btnode_cache_clear
(
&
ii
->
i_btnode_cache
);
}
static
int
nilfs_sync_super
(
struct
nilfs_sb_info
*
sbi
,
int
dupsb
)
{
struct
the_nilfs
*
nilfs
=
sbi
->
s_nilfs
;
...
...
@@ -467,7 +450,7 @@ static const struct super_operations nilfs_sops = {
/* .write_inode = nilfs_write_inode, */
/* .put_inode = nilfs_put_inode, */
/* .drop_inode = nilfs_drop_inode, */
.
delete_inode
=
nilfs_delete
_inode
,
.
evict_inode
=
nilfs_evict
_inode
,
.
put_super
=
nilfs_put_super
,
/* .write_super = nilfs_write_super, */
.
sync_fs
=
nilfs_sync_fs
,
...
...
@@ -475,7 +458,6 @@ static const struct super_operations nilfs_sops = {
/* .unlockfs */
.
statfs
=
nilfs_statfs
,
.
remount_fs
=
nilfs_remount
,
.
clear_inode
=
nilfs_clear_inode
,
/* .umount_begin */
.
show_options
=
nilfs_show_options
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录