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
e971a6d7
Commit
e971a6d7
authored
Jun 06, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stop icache pollution in hostfs, switch to ->evict_inode()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
f053ddde
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
22 deletions
+8
-22
fs/hostfs/hostfs_kern.c
fs/hostfs/hostfs_kern.c
+8
-22
No files found.
fs/hostfs/hostfs_kern.c
View file @
e971a6d7
...
@@ -241,16 +241,13 @@ static struct inode *hostfs_iget(struct super_block *sb)
...
@@ -241,16 +241,13 @@ static struct inode *hostfs_iget(struct super_block *sb)
struct
inode
*
inode
;
struct
inode
*
inode
;
long
ret
;
long
ret
;
inode
=
iget_locked
(
sb
,
0
);
inode
=
new_inode
(
sb
);
if
(
!
inode
)
if
(
!
inode
)
return
ERR_PTR
(
-
ENOMEM
);
return
ERR_PTR
(
-
ENOMEM
);
if
(
inode
->
i_state
&
I_NEW
)
{
ret
=
hostfs_read_inode
(
inode
);
ret
=
hostfs_read_inode
(
inode
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
iput
(
inode
);
iget_failed
(
inode
);
return
ERR_PTR
(
ret
);
return
ERR_PTR
(
ret
);
}
unlock_new_inode
(
inode
);
}
}
return
inode
;
return
inode
;
}
}
...
@@ -299,29 +296,19 @@ static struct inode *hostfs_alloc_inode(struct super_block *sb)
...
@@ -299,29 +296,19 @@ static struct inode *hostfs_alloc_inode(struct super_block *sb)
return
&
hi
->
vfs_inode
;
return
&
hi
->
vfs_inode
;
}
}
static
void
hostfs_
delete
_inode
(
struct
inode
*
inode
)
static
void
hostfs_
evict
_inode
(
struct
inode
*
inode
)
{
{
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
end_writeback
(
inode
);
if
(
HOSTFS_I
(
inode
)
->
fd
!=
-
1
)
{
if
(
HOSTFS_I
(
inode
)
->
fd
!=
-
1
)
{
close_file
(
&
HOSTFS_I
(
inode
)
->
fd
);
close_file
(
&
HOSTFS_I
(
inode
)
->
fd
);
HOSTFS_I
(
inode
)
->
fd
=
-
1
;
HOSTFS_I
(
inode
)
->
fd
=
-
1
;
}
}
clear_inode
(
inode
);
}
}
static
void
hostfs_destroy_inode
(
struct
inode
*
inode
)
static
void
hostfs_destroy_inode
(
struct
inode
*
inode
)
{
{
kfree
(
HOSTFS_I
(
inode
)
->
host_filename
);
kfree
(
HOSTFS_I
(
inode
)
->
host_filename
);
/*
* XXX: This should not happen, probably. The check is here for
* additional safety.
*/
if
(
HOSTFS_I
(
inode
)
->
fd
!=
-
1
)
{
close_file
(
&
HOSTFS_I
(
inode
)
->
fd
);
printk
(
KERN_DEBUG
"Closing host fd in .destroy_inode
\n
"
);
}
kfree
(
HOSTFS_I
(
inode
));
kfree
(
HOSTFS_I
(
inode
));
}
}
...
@@ -339,9 +326,8 @@ static int hostfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
...
@@ -339,9 +326,8 @@ static int hostfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
static
const
struct
super_operations
hostfs_sbops
=
{
static
const
struct
super_operations
hostfs_sbops
=
{
.
alloc_inode
=
hostfs_alloc_inode
,
.
alloc_inode
=
hostfs_alloc_inode
,
.
drop_inode
=
generic_delete_inode
,
.
delete_inode
=
hostfs_delete_inode
,
.
destroy_inode
=
hostfs_destroy_inode
,
.
destroy_inode
=
hostfs_destroy_inode
,
.
evict_inode
=
hostfs_evict_inode
,
.
statfs
=
hostfs_statfs
,
.
statfs
=
hostfs_statfs
,
.
show_options
=
hostfs_show_options
,
.
show_options
=
hostfs_show_options
,
};
};
...
...
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