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
58e8268c
Commit
58e8268c
authored
Jun 05, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch ufs to ->evict_inode()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
deee3ce4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
21 deletions
+28
-21
fs/ufs/ialloc.c
fs/ufs/ialloc.c
+0
-2
fs/ufs/inode.c
fs/ufs/inode.c
+26
-17
fs/ufs/super.c
fs/ufs/super.c
+1
-1
fs/ufs/ufs.h
fs/ufs/ufs.h
+1
-1
No files found.
fs/ufs/ialloc.c
View file @
58e8268c
...
@@ -94,8 +94,6 @@ void ufs_free_inode (struct inode * inode)
...
@@ -94,8 +94,6 @@ void ufs_free_inode (struct inode * inode)
is_directory
=
S_ISDIR
(
inode
->
i_mode
);
is_directory
=
S_ISDIR
(
inode
->
i_mode
);
clear_inode
(
inode
);
if
(
ubh_isclr
(
UCPI_UBH
(
ucpi
),
ucpi
->
c_iusedoff
,
bit
))
if
(
ubh_isclr
(
UCPI_UBH
(
ucpi
),
ucpi
->
c_iusedoff
,
bit
))
ufs_error
(
sb
,
"ufs_free_inode"
,
"bit already cleared for inode %u"
,
ino
);
ufs_error
(
sb
,
"ufs_free_inode"
,
"bit already cleared for inode %u"
,
ino
);
else
{
else
{
...
...
fs/ufs/inode.c
View file @
58e8268c
...
@@ -911,24 +911,33 @@ int ufs_sync_inode (struct inode *inode)
...
@@ -911,24 +911,33 @@ int ufs_sync_inode (struct inode *inode)
return
ufs_update_inode
(
inode
,
1
);
return
ufs_update_inode
(
inode
,
1
);
}
}
void
ufs_
delete_inode
(
struct
inode
*
inode
)
void
ufs_
evict_inode
(
struct
inode
*
inode
)
{
{
loff_t
old_i_size
;
int
want_delete
=
0
;
if
(
!
inode
->
i_nlink
&&
!
is_bad_inode
(
inode
))
want_delete
=
1
;
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
if
(
is_bad_inode
(
inode
))
if
(
want_delete
)
{
goto
no_delete
;
loff_t
old_i_size
;
/*UFS_I(inode)->i_dtime = CURRENT_TIME;*/
/*UFS_I(inode)->i_dtime = CURRENT_TIME;*/
lock_kernel
();
lock_kernel
();
mark_inode_dirty
(
inode
);
mark_inode_dirty
(
inode
);
ufs_update_inode
(
inode
,
IS_SYNC
(
inode
));
ufs_update_inode
(
inode
,
IS_SYNC
(
inode
));
old_i_size
=
inode
->
i_size
;
old_i_size
=
inode
->
i_size
;
inode
->
i_size
=
0
;
inode
->
i_size
=
0
;
if
(
inode
->
i_blocks
&&
ufs_truncate
(
inode
,
old_i_size
))
if
(
inode
->
i_blocks
&&
ufs_truncate
(
inode
,
old_i_size
))
ufs_warning
(
inode
->
i_sb
,
__func__
,
"ufs_truncate failed
\n
"
);
ufs_warning
(
inode
->
i_sb
,
__func__
,
"ufs_truncate failed
\n
"
);
ufs_free_inode
(
inode
);
unlock_kernel
();
unlock_kernel
();
}
return
;
no_delete:
invalidate_inode_buffers
(
inode
);
clear_inode
(
inode
);
/* We must guarantee clearing of inode... */
end_writeback
(
inode
);
if
(
want_delete
)
{
lock_kernel
();
ufs_free_inode
(
inode
);
unlock_kernel
();
}
}
}
fs/ufs/super.c
View file @
58e8268c
...
@@ -1440,7 +1440,7 @@ static const struct super_operations ufs_super_ops = {
...
@@ -1440,7 +1440,7 @@ static const struct super_operations ufs_super_ops = {
.
alloc_inode
=
ufs_alloc_inode
,
.
alloc_inode
=
ufs_alloc_inode
,
.
destroy_inode
=
ufs_destroy_inode
,
.
destroy_inode
=
ufs_destroy_inode
,
.
write_inode
=
ufs_write_inode
,
.
write_inode
=
ufs_write_inode
,
.
delete_inode
=
ufs_delete
_inode
,
.
evict_inode
=
ufs_evict
_inode
,
.
put_super
=
ufs_put_super
,
.
put_super
=
ufs_put_super
,
.
write_super
=
ufs_write_super
,
.
write_super
=
ufs_write_super
,
.
sync_fs
=
ufs_sync_fs
,
.
sync_fs
=
ufs_sync_fs
,
...
...
fs/ufs/ufs.h
View file @
58e8268c
...
@@ -108,7 +108,7 @@ extern struct inode * ufs_new_inode (struct inode *, int);
...
@@ -108,7 +108,7 @@ extern struct inode * ufs_new_inode (struct inode *, int);
extern
struct
inode
*
ufs_iget
(
struct
super_block
*
,
unsigned
long
);
extern
struct
inode
*
ufs_iget
(
struct
super_block
*
,
unsigned
long
);
extern
int
ufs_write_inode
(
struct
inode
*
,
struct
writeback_control
*
);
extern
int
ufs_write_inode
(
struct
inode
*
,
struct
writeback_control
*
);
extern
int
ufs_sync_inode
(
struct
inode
*
);
extern
int
ufs_sync_inode
(
struct
inode
*
);
extern
void
ufs_
delete
_inode
(
struct
inode
*
);
extern
void
ufs_
evict
_inode
(
struct
inode
*
);
extern
struct
buffer_head
*
ufs_bread
(
struct
inode
*
,
unsigned
,
int
,
int
*
);
extern
struct
buffer_head
*
ufs_bread
(
struct
inode
*
,
unsigned
,
int
,
int
*
);
extern
int
ufs_getfrag_block
(
struct
inode
*
inode
,
sector_t
fragment
,
struct
buffer_head
*
bh_result
,
int
create
);
extern
int
ufs_getfrag_block
(
struct
inode
*
inode
,
sector_t
fragment
,
struct
buffer_head
*
bh_result
,
int
create
);
...
...
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