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
Kirill Smelkov
linux
Commits
066d92dc
Commit
066d92dc
authored
Jun 08, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert ocfs2 to ->evict_inode()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
94ee8494
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
fs/ocfs2/inode.c
fs/ocfs2/inode.c
+14
-7
fs/ocfs2/inode.h
fs/ocfs2/inode.h
+1
-2
fs/ocfs2/super.c
fs/ocfs2/super.c
+1
-2
No files found.
fs/ocfs2/inode.c
View file @
066d92dc
...
...
@@ -969,7 +969,7 @@ static void ocfs2_cleanup_delete_inode(struct inode *inode,
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
}
void
ocfs2_delete_inode
(
struct
inode
*
inode
)
static
void
ocfs2_delete_inode
(
struct
inode
*
inode
)
{
int
wipe
,
status
;
sigset_t
oldset
;
...
...
@@ -1075,20 +1075,17 @@ void ocfs2_delete_inode(struct inode *inode)
bail_unblock:
ocfs2_unblock_signals
(
&
oldset
);
bail:
clear_inode
(
inode
);
mlog_exit_void
();
}
void
ocfs2_clear_inode
(
struct
inode
*
inode
)
static
void
ocfs2_clear_inode
(
struct
inode
*
inode
)
{
int
status
;
struct
ocfs2_inode_info
*
oi
=
OCFS2_I
(
inode
);
mlog_entry_void
();
if
(
!
inode
)
goto
bail
;
end_writeback
(
inode
);
mlog
(
0
,
"Clearing inode: %llu, nlink = %u
\n
"
,
(
unsigned
long
long
)
OCFS2_I
(
inode
)
->
ip_blkno
,
inode
->
i_nlink
);
...
...
@@ -1180,10 +1177,20 @@ void ocfs2_clear_inode(struct inode *inode)
jbd2_journal_release_jbd_inode
(
OCFS2_SB
(
inode
->
i_sb
)
->
journal
->
j_journal
,
&
oi
->
ip_jinode
);
bail:
mlog_exit_void
();
}
void
ocfs2_evict_inode
(
struct
inode
*
inode
)
{
if
(
!
inode
->
i_nlink
||
(
OCFS2_I
(
inode
)
->
ip_flags
&
OCFS2_INODE_MAYBE_ORPHANED
))
{
ocfs2_delete_inode
(
inode
);
}
else
{
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
}
ocfs2_clear_inode
(
inode
);
}
/* Called under inode_lock, with no more references on the
* struct inode, so it's safe here to check the flags field
* and to manipulate i_nlink without any other locks. */
...
...
fs/ocfs2/inode.h
View file @
066d92dc
...
...
@@ -123,8 +123,7 @@ static inline struct ocfs2_caching_info *INODE_CACHE(struct inode *inode)
return
&
OCFS2_I
(
inode
)
->
ip_metadata_cache
;
}
void
ocfs2_clear_inode
(
struct
inode
*
inode
);
void
ocfs2_delete_inode
(
struct
inode
*
inode
);
void
ocfs2_evict_inode
(
struct
inode
*
inode
);
void
ocfs2_drop_inode
(
struct
inode
*
inode
);
/* Flags for ocfs2_iget() */
...
...
fs/ocfs2/super.c
View file @
066d92dc
...
...
@@ -145,8 +145,7 @@ static const struct super_operations ocfs2_sops = {
.
alloc_inode
=
ocfs2_alloc_inode
,
.
destroy_inode
=
ocfs2_destroy_inode
,
.
drop_inode
=
ocfs2_drop_inode
,
.
clear_inode
=
ocfs2_clear_inode
,
.
delete_inode
=
ocfs2_delete_inode
,
.
evict_inode
=
ocfs2_evict_inode
,
.
sync_fs
=
ocfs2_sync_fs
,
.
put_super
=
ocfs2_put_super
,
.
remount_fs
=
ocfs2_remount
,
...
...
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