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
4093d306
Commit
4093d306
authored
8 years ago
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
securityfs: ->d_parent is never NULL or negative
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
07a8e62f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
security/inode.c
security/inode.c
+6
-5
No files found.
security/inode.c
View file @
4093d306
...
...
@@ -186,20 +186,21 @@ EXPORT_SYMBOL_GPL(securityfs_create_dir);
*/
void
securityfs_remove
(
struct
dentry
*
dentry
)
{
struct
dentry
*
parent
;
struct
inode
*
dir
;
if
(
!
dentry
||
IS_ERR
(
dentry
))
return
;
inode_lock
(
d_inode
(
parent
));
dir
=
d_inode
(
dentry
->
d_parent
);
inode_lock
(
dir
);
if
(
simple_positive
(
dentry
))
{
if
(
d_is_dir
(
dentry
))
simple_rmdir
(
d
_inode
(
parent
)
,
dentry
);
simple_rmdir
(
d
ir
,
dentry
);
else
simple_unlink
(
d
_inode
(
parent
)
,
dentry
);
simple_unlink
(
d
ir
,
dentry
);
dput
(
dentry
);
}
inode_unlock
(
d
_inode
(
parent
)
);
inode_unlock
(
d
ir
);
simple_release_fs
(
&
mount
,
&
mount_count
);
}
EXPORT_SYMBOL_GPL
(
securityfs_remove
);
...
...
This diff is collapsed.
Click to expand it.
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