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
01cd9fef
Commit
01cd9fef
authored
Jun 04, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch sysfs to ->evict_inode()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
8267952b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
fs/sysfs/inode.c
fs/sysfs/inode.c
+3
-3
fs/sysfs/mount.c
fs/sysfs/mount.c
+1
-1
fs/sysfs/sysfs.h
fs/sysfs/sysfs.h
+1
-1
No files found.
fs/sysfs/inode.c
View file @
01cd9fef
...
@@ -312,15 +312,15 @@ struct inode * sysfs_get_inode(struct super_block *sb, struct sysfs_dirent *sd)
...
@@ -312,15 +312,15 @@ struct inode * sysfs_get_inode(struct super_block *sb, struct sysfs_dirent *sd)
* The sysfs_dirent serves as both an inode and a directory entry for sysfs.
* The sysfs_dirent serves as both an inode and a directory entry for sysfs.
* To prevent the sysfs inode numbers from being freed prematurely we take a
* To prevent the sysfs inode numbers from being freed prematurely we take a
* reference to sysfs_dirent from the sysfs inode. A
* reference to sysfs_dirent from the sysfs inode. A
* super_operations.
delete
_inode() implementation is needed to drop that
* super_operations.
evict
_inode() implementation is needed to drop that
* reference upon inode destruction.
* reference upon inode destruction.
*/
*/
void
sysfs_
delete
_inode
(
struct
inode
*
inode
)
void
sysfs_
evict
_inode
(
struct
inode
*
inode
)
{
{
struct
sysfs_dirent
*
sd
=
inode
->
i_private
;
struct
sysfs_dirent
*
sd
=
inode
->
i_private
;
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
truncate_inode_pages
(
&
inode
->
i_data
,
0
);
clear_inode
(
inode
);
end_writeback
(
inode
);
sysfs_put
(
sd
);
sysfs_put
(
sd
);
}
}
...
...
fs/sysfs/mount.c
View file @
01cd9fef
...
@@ -29,7 +29,7 @@ struct kmem_cache *sysfs_dir_cachep;
...
@@ -29,7 +29,7 @@ struct kmem_cache *sysfs_dir_cachep;
static
const
struct
super_operations
sysfs_ops
=
{
static
const
struct
super_operations
sysfs_ops
=
{
.
statfs
=
simple_statfs
,
.
statfs
=
simple_statfs
,
.
drop_inode
=
generic_delete_inode
,
.
drop_inode
=
generic_delete_inode
,
.
delete_inode
=
sysfs_delete
_inode
,
.
evict_inode
=
sysfs_evict
_inode
,
};
};
struct
sysfs_dirent
sysfs_root
=
{
struct
sysfs_dirent
sysfs_root
=
{
...
...
fs/sysfs/sysfs.h
View file @
01cd9fef
...
@@ -198,7 +198,7 @@ static inline void __sysfs_put(struct sysfs_dirent *sd)
...
@@ -198,7 +198,7 @@ static inline void __sysfs_put(struct sysfs_dirent *sd)
* inode.c
* inode.c
*/
*/
struct
inode
*
sysfs_get_inode
(
struct
super_block
*
sb
,
struct
sysfs_dirent
*
sd
);
struct
inode
*
sysfs_get_inode
(
struct
super_block
*
sb
,
struct
sysfs_dirent
*
sd
);
void
sysfs_
delete
_inode
(
struct
inode
*
inode
);
void
sysfs_
evict
_inode
(
struct
inode
*
inode
);
int
sysfs_sd_setattr
(
struct
sysfs_dirent
*
sd
,
struct
iattr
*
iattr
);
int
sysfs_sd_setattr
(
struct
sysfs_dirent
*
sd
,
struct
iattr
*
iattr
);
int
sysfs_permission
(
struct
inode
*
inode
,
int
mask
);
int
sysfs_permission
(
struct
inode
*
inode
,
int
mask
);
int
sysfs_setattr
(
struct
dentry
*
dentry
,
struct
iattr
*
iattr
);
int
sysfs_setattr
(
struct
dentry
*
dentry
,
struct
iattr
*
iattr
);
...
...
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