Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b57922d9
Commit
b57922d9
authored
Jun 07, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert remaining ->clear_inode() to ->evict_inode()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
45321ac5
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
94 additions
and
59 deletions
+94
-59
fs/9p/v9fs_vfs.h
fs/9p/v9fs_vfs.h
+1
-1
fs/9p/vfs_inode.c
fs/9p/vfs_inode.c
+3
-1
fs/9p/vfs_super.c
fs/9p/vfs_super.c
+2
-2
fs/afs/inode.c
fs/afs/inode.c
+4
-1
fs/afs/internal.h
fs/afs/internal.h
+1
-1
fs/afs/super.c
fs/afs/super.c
+1
-1
fs/binfmt_misc.c
fs/binfmt_misc.c
+3
-2
fs/block_dev.c
fs/block_dev.c
+5
-2
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+4
-2
fs/coda/inode.c
fs/coda/inode.c
+5
-3
fs/ecryptfs/super.c
fs/ecryptfs/super.c
+5
-3
fs/freevxfs/vxfs_extern.h
fs/freevxfs/vxfs_extern.h
+1
-1
fs/freevxfs/vxfs_inode.c
fs/freevxfs/vxfs_inode.c
+5
-3
fs/freevxfs/vxfs_super.c
fs/freevxfs/vxfs_super.c
+1
-1
fs/fuse/inode.c
fs/fuse/inode.c
+4
-2
fs/hfs/hfs_fs.h
fs/hfs/hfs_fs.h
+1
-1
fs/hfs/inode.c
fs/hfs/inode.c
+3
-1
fs/hfs/super.c
fs/hfs/super.c
+1
-1
fs/hfsplus/super.c
fs/hfsplus/super.c
+5
-3
fs/inode.c
fs/inode.c
+0
-2
fs/jffs2/fs.c
fs/jffs2/fs.c
+4
-2
fs/jffs2/os-linux.h
fs/jffs2/os-linux.h
+1
-1
fs/jffs2/super.c
fs/jffs2/super.c
+1
-1
fs/jffs2/xattr.c
fs/jffs2/xattr.c
+1
-1
fs/nfs/inode.c
fs/nfs/inode.c
+11
-2
fs/nfs/internal.h
fs/nfs/internal.h
+2
-2
fs/nfs/super.c
fs/nfs/super.c
+2
-2
fs/ntfs/inode.c
fs/ntfs/inode.c
+5
-2
fs/ntfs/inode.h
fs/ntfs/inode.h
+1
-1
fs/ntfs/super.c
fs/ntfs/super.c
+1
-1
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/dlmfs/dlmfs.c
+3
-4
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_super.c
+5
-3
fs/xfs/linux-2.6/xfs_trace.h
fs/xfs/linux-2.6/xfs_trace.h
+1
-1
include/linux/fs.h
include/linux/fs.h
+1
-2
No files found.
fs/9p/v9fs_vfs.h
View file @
b57922d9
...
...
@@ -52,7 +52,7 @@ void v9fs_destroy_inode(struct inode *inode);
#endif
struct
inode
*
v9fs_get_inode
(
struct
super_block
*
sb
,
int
mode
);
void
v9fs_
clear
_inode
(
struct
inode
*
inode
);
void
v9fs_
evict
_inode
(
struct
inode
*
inode
);
ino_t
v9fs_qid2ino
(
struct
p9_qid
*
qid
);
void
v9fs_stat2inode
(
struct
p9_wstat
*
,
struct
inode
*
,
struct
super_block
*
);
int
v9fs_dir_release
(
struct
inode
*
inode
,
struct
file
*
filp
);
...
...
fs/9p/vfs_inode.c
View file @
b57922d9
...
...
@@ -387,8 +387,10 @@ v9fs_clone_walk(struct v9fs_session_info *v9ses, u32 fid, struct dentry *dentry)
* @inode: inode to release
*
*/
void
v9fs_
clear
_inode
(
struct
inode
*
inode
)
void
v9fs_
evict
_inode
(
struct
inode
*
inode
)
{
truncate_inode_pages
(
inode
->
i_mapping
,
0
);
end_writeback
(
inode
);
filemap_fdatawrite
(
inode
->
i_mapping
);
#ifdef CONFIG_9P_FSCACHE
...
...
fs/9p/vfs_super.c
View file @
b57922d9
...
...
@@ -257,7 +257,7 @@ static const struct super_operations v9fs_super_ops = {
.
destroy_inode
=
v9fs_destroy_inode
,
#endif
.
statfs
=
simple_statfs
,
.
clear_inode
=
v9fs_clear
_inode
,
.
evict_inode
=
v9fs_evict
_inode
,
.
show_options
=
generic_show_options
,
.
umount_begin
=
v9fs_umount_begin
,
};
...
...
@@ -268,7 +268,7 @@ static const struct super_operations v9fs_super_ops_dotl = {
.
destroy_inode
=
v9fs_destroy_inode
,
#endif
.
statfs
=
v9fs_statfs
,
.
clear_inode
=
v9fs_clear
_inode
,
.
evict_inode
=
v9fs_evict
_inode
,
.
show_options
=
generic_show_options
,
.
umount_begin
=
v9fs_umount_begin
,
};
...
...
fs/afs/inode.c
View file @
b57922d9
...
...
@@ -316,7 +316,7 @@ int afs_getattr(struct vfsmount *mnt, struct dentry *dentry,
/*
* clear an AFS inode
*/
void
afs_
clear
_inode
(
struct
inode
*
inode
)
void
afs_
evict
_inode
(
struct
inode
*
inode
)
{
struct
afs_permits
*
permits
;
struct
afs_vnode
*
vnode
;
...
...
@@ -335,6 +335,9 @@ void afs_clear_inode(struct inode *inode)
ASSERTCMP
(
inode
->
i_ino
,
==
,
vnode
->
fid
.
vnode
);
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
afs_give_up_callback
(
vnode
);
if
(
vnode
->
server
)
{
...
...
fs/afs/internal.h
View file @
b57922d9
...
...
@@ -565,7 +565,7 @@ extern void afs_zap_data(struct afs_vnode *);
extern
int
afs_validate
(
struct
afs_vnode
*
,
struct
key
*
);
extern
int
afs_getattr
(
struct
vfsmount
*
,
struct
dentry
*
,
struct
kstat
*
);
extern
int
afs_setattr
(
struct
dentry
*
,
struct
iattr
*
);
extern
void
afs_
clear
_inode
(
struct
inode
*
);
extern
void
afs_
evict
_inode
(
struct
inode
*
);
/*
* main.c
...
...
fs/afs/super.c
View file @
b57922d9
...
...
@@ -49,7 +49,7 @@ static const struct super_operations afs_super_ops = {
.
statfs
=
afs_statfs
,
.
alloc_inode
=
afs_alloc_inode
,
.
destroy_inode
=
afs_destroy_inode
,
.
clear_inode
=
afs_clear
_inode
,
.
evict_inode
=
afs_evict
_inode
,
.
put_super
=
afs_put_super
,
.
show_options
=
generic_show_options
,
};
...
...
fs/binfmt_misc.c
View file @
b57922d9
...
...
@@ -502,8 +502,9 @@ static struct inode *bm_get_inode(struct super_block *sb, int mode)
return
inode
;
}
static
void
bm_
clear
_inode
(
struct
inode
*
inode
)
static
void
bm_
evict
_inode
(
struct
inode
*
inode
)
{
end_writeback
(
inode
);
kfree
(
inode
->
i_private
);
}
...
...
@@ -685,7 +686,7 @@ static const struct file_operations bm_status_operations = {
static
const
struct
super_operations
s_ops
=
{
.
statfs
=
simple_statfs
,
.
clear_inode
=
bm_clear
_inode
,
.
evict_inode
=
bm_evict
_inode
,
};
static
int
bm_fill_super
(
struct
super_block
*
sb
,
void
*
data
,
int
silent
)
...
...
fs/block_dev.c
View file @
b57922d9
...
...
@@ -426,10 +426,13 @@ static inline void __bd_forget(struct inode *inode)
inode
->
i_mapping
=
&
inode
->
i_data
;
}
static
void
bdev_
clear
_inode
(
struct
inode
*
inode
)
static
void
bdev_
evict
_inode
(
struct
inode
*
inode
)
{
struct
block_device
*
bdev
=
&
BDEV_I
(
inode
)
->
bdev
;
struct
list_head
*
p
;
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
invalidate_inode_buffers
(
inode
);
/* is it needed here? */
end_writeback
(
inode
);
spin_lock
(
&
bdev_lock
);
while
(
(
p
=
bdev
->
bd_inodes
.
next
)
!=
&
bdev
->
bd_inodes
)
{
__bd_forget
(
list_entry
(
p
,
struct
inode
,
i_devices
));
...
...
@@ -443,7 +446,7 @@ static const struct super_operations bdev_sops = {
.
alloc_inode
=
bdev_alloc_inode
,
.
destroy_inode
=
bdev_destroy_inode
,
.
drop_inode
=
generic_delete_inode
,
.
clear_inode
=
bdev_clear
_inode
,
.
evict_inode
=
bdev_evict
_inode
,
};
static
int
bd_get_sb
(
struct
file_system_type
*
fs_type
,
...
...
fs/cifs/cifsfs.c
View file @
b57922d9
...
...
@@ -330,8 +330,10 @@ cifs_destroy_inode(struct inode *inode)
}
static
void
cifs_
clear
_inode
(
struct
inode
*
inode
)
cifs_
evict
_inode
(
struct
inode
*
inode
)
{
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
cifs_fscache_release_inode_cookie
(
inode
);
}
...
...
@@ -495,7 +497,7 @@ static const struct super_operations cifs_super_ops = {
.
alloc_inode
=
cifs_alloc_inode
,
.
destroy_inode
=
cifs_destroy_inode
,
.
drop_inode
=
cifs_drop_inode
,
.
clear_inode
=
cifs_clear
_inode
,
.
evict_inode
=
cifs_evict
_inode
,
/* .delete_inode = cifs_delete_inode, */
/* Do not need above
function unless later we add lazy close of inodes or unless the
kernel forgets to call us with the same number of releases (closes)
...
...
fs/coda/inode.c
View file @
b57922d9
...
...
@@ -35,7 +35,7 @@
#include "coda_int.h"
/* VFS super_block ops */
static
void
coda_
clear
_inode
(
struct
inode
*
);
static
void
coda_
evict
_inode
(
struct
inode
*
);
static
void
coda_put_super
(
struct
super_block
*
);
static
int
coda_statfs
(
struct
dentry
*
dentry
,
struct
kstatfs
*
buf
);
...
...
@@ -93,7 +93,7 @@ static const struct super_operations coda_super_operations =
{
.
alloc_inode
=
coda_alloc_inode
,
.
destroy_inode
=
coda_destroy_inode
,
.
clear_inode
=
coda_clear
_inode
,
.
evict_inode
=
coda_evict
_inode
,
.
put_super
=
coda_put_super
,
.
statfs
=
coda_statfs
,
.
remount_fs
=
coda_remount
,
...
...
@@ -224,8 +224,10 @@ static void coda_put_super(struct super_block *sb)
printk
(
"Coda: Bye bye.
\n
"
);
}
static
void
coda_
clear
_inode
(
struct
inode
*
inode
)
static
void
coda_
evict
_inode
(
struct
inode
*
inode
)
{
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
coda_cache_clear_inode
(
inode
);
}
...
...
fs/ecryptfs/super.c
View file @
b57922d9
...
...
@@ -122,7 +122,7 @@ static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf)
}
/**
* ecryptfs_
clear
_inode
* ecryptfs_
evict
_inode
* @inode - The ecryptfs inode
*
* Called by iput() when the inode reference count reached zero
...
...
@@ -131,8 +131,10 @@ static int ecryptfs_statfs(struct dentry *dentry, struct kstatfs *buf)
* on the inode free list. We use this to drop out reference to the
* lower inode.
*/
static
void
ecryptfs_
clear
_inode
(
struct
inode
*
inode
)
static
void
ecryptfs_
evict
_inode
(
struct
inode
*
inode
)
{
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
iput
(
ecryptfs_inode_to_lower
(
inode
));
}
...
...
@@ -184,6 +186,6 @@ const struct super_operations ecryptfs_sops = {
.
drop_inode
=
generic_delete_inode
,
.
statfs
=
ecryptfs_statfs
,
.
remount_fs
=
NULL
,
.
clear_inode
=
ecryptfs_clear
_inode
,
.
evict_inode
=
ecryptfs_evict
_inode
,
.
show_options
=
ecryptfs_show_options
};
fs/freevxfs/vxfs_extern.h
View file @
b57922d9
...
...
@@ -63,7 +63,7 @@ extern void vxfs_put_fake_inode(struct inode *);
extern
struct
vxfs_inode_info
*
vxfs_blkiget
(
struct
super_block
*
,
u_long
,
ino_t
);
extern
struct
vxfs_inode_info
*
vxfs_stiget
(
struct
super_block
*
,
ino_t
);
extern
struct
inode
*
vxfs_iget
(
struct
super_block
*
,
ino_t
);
extern
void
vxfs_
clear
_inode
(
struct
inode
*
);
extern
void
vxfs_
evict
_inode
(
struct
inode
*
);
/* vxfs_lookup.c */
extern
const
struct
inode_operations
vxfs_dir_inode_ops
;
...
...
fs/freevxfs/vxfs_inode.c
View file @
b57922d9
...
...
@@ -337,15 +337,17 @@ vxfs_iget(struct super_block *sbp, ino_t ino)
}
/**
* vxfs_
clear
_inode - remove inode from main memory
* vxfs_
evict
_inode - remove inode from main memory
* @ip: inode to discard.
*
* Description:
* vxfs_
clear
_inode() is called on the final iput and frees the private
* vxfs_
evict
_inode() is called on the final iput and frees the private
* inode area.
*/
void
vxfs_
clear
_inode
(
struct
inode
*
ip
)
vxfs_
evict
_inode
(
struct
inode
*
ip
)
{
truncate_inode_pages
(
&
ip
->
i_data
,
0
);
end_writeback
(
ip
);
kmem_cache_free
(
vxfs_inode_cachep
,
ip
->
i_private
);
}
fs/freevxfs/vxfs_super.c
View file @
b57922d9
...
...
@@ -61,7 +61,7 @@ static int vxfs_statfs(struct dentry *, struct kstatfs *);
static
int
vxfs_remount
(
struct
super_block
*
,
int
*
,
char
*
);
static
const
struct
super_operations
vxfs_super_ops
=
{
.
clear_inode
=
vxfs_clear
_inode
,
.
evict_inode
=
vxfs_evict
_inode
,
.
put_super
=
vxfs_put_super
,
.
statfs
=
vxfs_statfs
,
.
remount_fs
=
vxfs_remount
,
...
...
fs/fuse/inode.c
View file @
b57922d9
...
...
@@ -122,8 +122,10 @@ void fuse_send_forget(struct fuse_conn *fc, struct fuse_req *req,
fuse_request_send_noreply
(
fc
,
req
);
}
static
void
fuse_
clear
_inode
(
struct
inode
*
inode
)
static
void
fuse_
evict
_inode
(
struct
inode
*
inode
)
{
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
if
(
inode
->
i_sb
->
s_flags
&
MS_ACTIVE
)
{
struct
fuse_conn
*
fc
=
get_fuse_conn
(
inode
);
struct
fuse_inode
*
fi
=
get_fuse_inode
(
inode
);
...
...
@@ -736,7 +738,7 @@ static const struct export_operations fuse_export_operations = {
static
const
struct
super_operations
fuse_super_operations
=
{
.
alloc_inode
=
fuse_alloc_inode
,
.
destroy_inode
=
fuse_destroy_inode
,
.
clear_inode
=
fuse_clear
_inode
,
.
evict_inode
=
fuse_evict
_inode
,
.
drop_inode
=
generic_delete_inode
,
.
remount_fs
=
fuse_remount_fs
,
.
put_super
=
fuse_put_super
,
...
...
fs/hfs/hfs_fs.h
View file @
b57922d9
...
...
@@ -193,7 +193,7 @@ extern int hfs_inode_setattr(struct dentry *, struct iattr *);
extern
void
hfs_inode_read_fork
(
struct
inode
*
inode
,
struct
hfs_extent
*
ext
,
__be32
log_size
,
__be32
phys_size
,
u32
clump_size
);
extern
struct
inode
*
hfs_iget
(
struct
super_block
*
,
struct
hfs_cat_key
*
,
hfs_cat_rec
*
);
extern
void
hfs_
clear
_inode
(
struct
inode
*
);
extern
void
hfs_
evict
_inode
(
struct
inode
*
);
extern
void
hfs_delete_inode
(
struct
inode
*
);
/* attr.c */
...
...
fs/hfs/inode.c
View file @
b57922d9
...
...
@@ -531,8 +531,10 @@ static struct dentry *hfs_file_lookup(struct inode *dir, struct dentry *dentry,
return
NULL
;
}
void
hfs_
clear
_inode
(
struct
inode
*
inode
)
void
hfs_
evict
_inode
(
struct
inode
*
inode
)
{
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
if
(
HFS_IS_RSRC
(
inode
)
&&
HFS_I
(
inode
)
->
rsrc_inode
)
{
HFS_I
(
HFS_I
(
inode
)
->
rsrc_inode
)
->
rsrc_inode
=
NULL
;
iput
(
HFS_I
(
inode
)
->
rsrc_inode
);
...
...
fs/hfs/super.c
View file @
b57922d9
...
...
@@ -181,7 +181,7 @@ static const struct super_operations hfs_super_operations = {
.
alloc_inode
=
hfs_alloc_inode
,
.
destroy_inode
=
hfs_destroy_inode
,
.
write_inode
=
hfs_write_inode
,
.
clear_inode
=
hfs_clear
_inode
,
.
evict_inode
=
hfs_evict
_inode
,
.
put_super
=
hfs_put_super
,
.
write_super
=
hfs_write_super
,
.
sync_fs
=
hfs_sync_fs
,
...
...
fs/hfsplus/super.c
View file @
b57922d9
...
...
@@ -145,9 +145,11 @@ static int hfsplus_write_inode(struct inode *inode,
return
ret
;
}
static
void
hfsplus_
clear
_inode
(
struct
inode
*
inode
)
static
void
hfsplus_
evict
_inode
(
struct
inode
*
inode
)
{
dprint
(
DBG_INODE
,
"hfsplus_clear_inode: %lu
\n
"
,
inode
->
i_ino
);
dprint
(
DBG_INODE
,
"hfsplus_evict_inode: %lu
\n
"
,
inode
->
i_ino
);
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
if
(
HFSPLUS_IS_RSRC
(
inode
))
{
HFSPLUS_I
(
HFSPLUS_I
(
inode
).
rsrc_inode
).
rsrc_inode
=
NULL
;
iput
(
HFSPLUS_I
(
inode
).
rsrc_inode
);
...
...
@@ -293,7 +295,7 @@ static const struct super_operations hfsplus_sops = {
.
alloc_inode
=
hfsplus_alloc_inode
,
.
destroy_inode
=
hfsplus_destroy_inode
,
.
write_inode
=
hfsplus_write_inode
,
.
clear_inode
=
hfsplus_clear
_inode
,
.
evict_inode
=
hfsplus_evict
_inode
,
.
put_super
=
hfsplus_put_super
,
.
write_super
=
hfsplus_write_super
,
.
sync_fs
=
hfsplus_sync_fs
,
...
...
fs/inode.c
View file @
b57922d9
...
...
@@ -317,8 +317,6 @@ static void evict(struct inode *inode)
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
invalidate_inode_buffers
(
inode
);
end_writeback
(
inode
);
if
(
op
->
clear_inode
)
op
->
clear_inode
(
inode
);
}
if
(
S_ISBLK
(
inode
->
i_mode
)
&&
inode
->
i_bdev
)
bd_forget
(
inode
);
...
...
fs/jffs2/fs.c
View file @
b57922d9
...
...
@@ -225,7 +225,7 @@ int jffs2_statfs(struct dentry *dentry, struct kstatfs *buf)
}
void
jffs2_
clear
_inode
(
struct
inode
*
inode
)
void
jffs2_
evict
_inode
(
struct
inode
*
inode
)
{
/* We can forget about this inode for now - drop all
* the nodelists associated with it, etc.
...
...
@@ -233,7 +233,9 @@ void jffs2_clear_inode (struct inode *inode)
struct
jffs2_sb_info
*
c
=
JFFS2_SB_INFO
(
inode
->
i_sb
);
struct
jffs2_inode_info
*
f
=
JFFS2_INODE_INFO
(
inode
);
D1
(
printk
(
KERN_DEBUG
"jffs2_clear_inode(): ino #%lu mode %o
\n
"
,
inode
->
i_ino
,
inode
->
i_mode
));
D1
(
printk
(
KERN_DEBUG
"jffs2_evict_inode(): ino #%lu mode %o
\n
"
,
inode
->
i_ino
,
inode
->
i_mode
));
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
jffs2_do_clear_inode
(
c
,
f
);
}
...
...
fs/jffs2/os-linux.h
View file @
b57922d9
...
...
@@ -171,7 +171,7 @@ extern const struct inode_operations jffs2_symlink_inode_operations;
int
jffs2_setattr
(
struct
dentry
*
,
struct
iattr
*
);
int
jffs2_do_setattr
(
struct
inode
*
,
struct
iattr
*
);
struct
inode
*
jffs2_iget
(
struct
super_block
*
,
unsigned
long
);
void
jffs2_
clear
_inode
(
struct
inode
*
);
void
jffs2_
evict
_inode
(
struct
inode
*
);
void
jffs2_dirty_inode
(
struct
inode
*
inode
);
struct
inode
*
jffs2_new_inode
(
struct
inode
*
dir_i
,
int
mode
,
struct
jffs2_raw_inode
*
ri
);
...
...
fs/jffs2/super.c
View file @
b57922d9
...
...
@@ -135,7 +135,7 @@ static const struct super_operations jffs2_super_operations =
.
write_super
=
jffs2_write_super
,
.
statfs
=
jffs2_statfs
,
.
remount_fs
=
jffs2_remount_fs
,
.
clear_inode
=
jffs2_clear
_inode
,
.
evict_inode
=
jffs2_evict
_inode
,
.
dirty_inode
=
jffs2_dirty_inode
,
.
sync_fs
=
jffs2_sync_fs
,
};
...
...
fs/jffs2/xattr.c
View file @
b57922d9
...
...
@@ -588,7 +588,7 @@ static void delete_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *re
void
jffs2_xattr_delete_inode
(
struct
jffs2_sb_info
*
c
,
struct
jffs2_inode_cache
*
ic
)
{
/* It's called from jffs2_
clear
_inode() on inode removing.
/* It's called from jffs2_
evict
_inode() on inode removing.
When an inode with XATTR is removed, those XATTRs must be removed. */
struct
jffs2_xattr_ref
*
ref
,
*
_ref
;
...
...
fs/nfs/inode.c
View file @
b57922d9
...
...
@@ -98,7 +98,7 @@ u64 nfs_compat_user_ino64(u64 fileid)
return
ino
;
}
void
nfs_clear_inode
(
struct
inode
*
inode
)
static
void
nfs_clear_inode
(
struct
inode
*
inode
)
{
/*
* The following should never happen...
...
...
@@ -110,6 +110,13 @@ void nfs_clear_inode(struct inode *inode)
nfs_fscache_release_inode_cookie
(
inode
);
}
void
nfs_evict_inode
(
struct
inode
*
inode
)
{
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
nfs_clear_inode
(
inode
);
}
/**
* nfs_sync_mapping - helper to flush all mmapped dirty data to disk
*/
...
...
@@ -1338,8 +1345,10 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
* to open() calls that passed nfs_atomic_lookup, but failed to call
* nfs_open().
*/
void
nfs4_
clear
_inode
(
struct
inode
*
inode
)
void
nfs4_
evict
_inode
(
struct
inode
*
inode
)
{
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
/* If we are holding a delegation, return it! */
nfs_inode_return_delegation_noreclaim
(
inode
);
/* First call standard NFS clear_inode() code */
...
...
fs/nfs/internal.h
View file @
b57922d9
...
...
@@ -213,9 +213,9 @@ extern struct workqueue_struct *nfsiod_workqueue;
extern
struct
inode
*
nfs_alloc_inode
(
struct
super_block
*
sb
);
extern
void
nfs_destroy_inode
(
struct
inode
*
);
extern
int
nfs_write_inode
(
struct
inode
*
,
struct
writeback_control
*
);
extern
void
nfs_
clear
_inode
(
struct
inode
*
);
extern
void
nfs_
evict
_inode
(
struct
inode
*
);
#ifdef CONFIG_NFS_V4
extern
void
nfs4_
clear
_inode
(
struct
inode
*
);
extern
void
nfs4_
evict
_inode
(
struct
inode
*
);
#endif
void
nfs_zap_acl_cache
(
struct
inode
*
inode
);
extern
int
nfs_wait_bit_killable
(
void
*
word
);
...
...
fs/nfs/super.c
View file @
b57922d9
...
...
@@ -270,7 +270,7 @@ static const struct super_operations nfs_sops = {
.
write_inode
=
nfs_write_inode
,
.
put_super
=
nfs_put_super
,
.
statfs
=
nfs_statfs
,
.
clear_inode
=
nfs_clear
_inode
,
.
evict_inode
=
nfs_evict
_inode
,
.
umount_begin
=
nfs_umount_begin
,
.
show_options
=
nfs_show_options
,
.
show_stats
=
nfs_show_stats
,
...
...
@@ -340,7 +340,7 @@ static const struct super_operations nfs4_sops = {
.
write_inode
=
nfs_write_inode
,
.
put_super
=
nfs_put_super
,
.
statfs
=
nfs_statfs
,
.
clear_inode
=
nfs4_clear
_inode
,
.
evict_inode
=
nfs4_evict
_inode
,
.
umount_begin
=
nfs_umount_begin
,
.
show_options
=
nfs_show_options
,
.
show_stats
=
nfs_show_stats
,
...
...
fs/ntfs/inode.c
View file @
b57922d9
...
...
@@ -2238,7 +2238,7 @@ void ntfs_clear_extent_inode(ntfs_inode *ni)
}
/**
* ntfs_
clear
_big_inode - clean up the ntfs specific part of an inode
* ntfs_
evict
_big_inode - clean up the ntfs specific part of an inode
* @vi: vfs inode pending annihilation
*
* When the VFS is going to remove an inode from memory, ntfs_clear_big_inode()
...
...
@@ -2247,10 +2247,13 @@ void ntfs_clear_extent_inode(ntfs_inode *ni)
*
* If the MFT record is dirty, we commit it before doing anything else.
*/
void
ntfs_
clear
_big_inode
(
struct
inode
*
vi
)
void
ntfs_
evict
_big_inode
(
struct
inode
*
vi
)
{
ntfs_inode
*
ni
=
NTFS_I
(
vi
);
truncate_inode_pages
(
&
vi
->
i_data
,
0
);
end_writeback
(
vi
);
#ifdef NTFS_RW
if
(
NInoDirty
(
ni
))
{
bool
was_bad
=
(
is_bad_inode
(
vi
));
...
...
fs/ntfs/inode.h
View file @
b57922d9
...
...
@@ -279,7 +279,7 @@ extern struct inode *ntfs_index_iget(struct inode *base_vi, ntfschar *name,
extern
struct
inode
*
ntfs_alloc_big_inode
(
struct
super_block
*
sb
);
extern
void
ntfs_destroy_big_inode
(
struct
inode
*
inode
);
extern
void
ntfs_
clear
_big_inode
(
struct
inode
*
vi
);
extern
void
ntfs_
evict
_big_inode
(
struct
inode
*
vi
);
extern
void
__ntfs_init_inode
(
struct
super_block
*
sb
,
ntfs_inode
*
ni
);
...
...
fs/ntfs/super.c
View file @
b57922d9
...
...
@@ -2700,7 +2700,7 @@ static const struct super_operations ntfs_sops = {
.
put_super
=
ntfs_put_super
,
/* Syscall: umount. */
.
statfs
=
ntfs_statfs
,
/* Syscall: statfs */
.
remount_fs
=
ntfs_remount
,
/* Syscall: mount -o remount. */
.
clear_inode
=
ntfs_clear
_big_inode
,
/* VFS: Called when an inode is
.
evict_inode
=
ntfs_evict
_big_inode
,
/* VFS: Called when an inode is
removed from memory. */
//.umount_begin = NULL, /* Forced umount. */
.
show_options
=
ntfs_show_options
,
/* Show mount options in
...
...
fs/ocfs2/dlmfs/dlmfs.c
View file @
b57922d9
...
...
@@ -357,13 +357,12 @@ static void dlmfs_destroy_inode(struct inode *inode)
kmem_cache_free
(
dlmfs_inode_cache
,
DLMFS_I
(
inode
));
}
static
void
dlmfs_
clear
_inode
(
struct
inode
*
inode
)
static
void
dlmfs_
evict
_inode
(
struct
inode
*
inode
)
{
int
status
;
struct
dlmfs_inode_private
*
ip
;
if
(
!
inode
)
return
;
end_writeback
(
inode
);
mlog
(
0
,
"inode %lu
\n
"
,
inode
->
i_ino
);
...
...
@@ -633,7 +632,7 @@ static const struct super_operations dlmfs_ops = {
.
statfs
=
simple_statfs
,
.
alloc_inode
=
dlmfs_alloc_inode
,
.
destroy_inode
=
dlmfs_destroy_inode
,
.
clear_inode
=
dlmfs_clear
_inode
,
.
evict_inode
=
dlmfs_evict
_inode
,
.
drop_inode
=
generic_delete_inode
,
};
...
...
fs/xfs/linux-2.6/xfs_super.c
View file @
b57922d9
...
...
@@ -1100,13 +1100,15 @@ xfs_fs_write_inode(
}
STATIC
void
xfs_fs_
clear
_inode
(
xfs_fs_
evict
_inode
(
struct
inode
*
inode
)
{
xfs_inode_t
*
ip
=
XFS_I
(
inode
);
trace_xfs_
clear
_inode
(
ip
);
trace_xfs_
evict
_inode
(
ip
);
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
XFS_STATS_INC
(
vn_rele
);
XFS_STATS_INC
(
vn_remove
);
XFS_STATS_DEC
(
vn_active
);
...
...
@@ -1622,7 +1624,7 @@ static const struct super_operations xfs_super_operations = {
.
destroy_inode
=
xfs_fs_destroy_inode
,
.
dirty_inode
=
xfs_fs_dirty_inode
,
.
write_inode
=
xfs_fs_write_inode
,
.
clear_inode
=
xfs_fs_clear
_inode
,
.
evict_inode
=
xfs_fs_evict
_inode
,
.
put_super
=
xfs_fs_put_super
,
.
sync_fs
=
xfs_fs_sync_fs
,
.
freeze_fs
=
xfs_fs_freeze
,
...
...
fs/xfs/linux-2.6/xfs_trace.h
View file @
b57922d9
...
...
@@ -581,7 +581,7 @@ DEFINE_INODE_EVENT(xfs_ioctl_setattr);
DEFINE_INODE_EVENT
(
xfs_file_fsync
);
DEFINE_INODE_EVENT
(
xfs_destroy_inode
);
DEFINE_INODE_EVENT
(
xfs_write_inode
);
DEFINE_INODE_EVENT
(
xfs_
clear
_inode
);
DEFINE_INODE_EVENT
(
xfs_
evict
_inode
);
DEFINE_INODE_EVENT
(
xfs_dquot_dqalloc
);
DEFINE_INODE_EVENT
(
xfs_dquot_dqdetach
);
...
...
include/linux/fs.h
View file @
b57922d9
...
...
@@ -1571,7 +1571,6 @@ struct super_operations {
int
(
*
unfreeze_fs
)
(
struct
super_block
*
);
int
(
*
statfs
)
(
struct
dentry
*
,
struct
kstatfs
*
);
int
(
*
remount_fs
)
(
struct
super_block
*
,
int
*
,
char
*
);
void
(
*
clear_inode
)
(
struct
inode
*
);
void
(
*
umount_begin
)
(
struct
super_block
*
);
int
(
*
show_options
)(
struct
seq_file
*
,
struct
vfsmount
*
);
...
...
@@ -1616,7 +1615,7 @@ struct super_operations {
* I_FREEING Set when inode is about to be freed but still has dirty
* pages or buffers attached or the inode itself is still
* dirty.
* I_CLEAR Added by
clear_inode
(). In this state the inode is clean
* I_CLEAR Added by
end_writeback
(). In this state the inode is clean
* and can be destroyed. Inode keeps I_FREEING.
*
* Inodes that are I_WILL_FREE, I_FREEING or I_CLEAR are
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment