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
3cc0658e
Commit
3cc0658e
authored
Jul 17, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hppfs: fix dentry leak
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
0577d1ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
fs/hppfs/hppfs.c
fs/hppfs/hppfs.c
+6
-6
No files found.
fs/hppfs/hppfs.c
View file @
3cc0658e
...
...
@@ -174,13 +174,11 @@ static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry,
err
=
-
ENOMEM
;
inode
=
get_inode
(
ino
->
i_sb
,
proc_dentry
);
if
(
!
inode
)
goto
out
_dput
;
goto
out
;
d_add
(
dentry
,
inode
);
return
NULL
;
out_dput:
dput
(
proc_dentry
);
out:
return
ERR_PTR
(
err
);
}
...
...
@@ -690,8 +688,10 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
struct
inode
*
proc_ino
=
dentry
->
d_inode
;
struct
inode
*
inode
=
new_inode
(
sb
);
if
(
!
inode
)
if
(
!
inode
)
{
dput
(
dentry
);
return
ERR_PTR
(
-
ENOMEM
);
}
if
(
S_ISDIR
(
dentry
->
d_inode
->
i_mode
))
{
inode
->
i_op
=
&
hppfs_dir_iops
;
...
...
@@ -704,7 +704,7 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
inode
->
i_fop
=
&
hppfs_file_fops
;
}
HPPFS_I
(
inode
)
->
proc_dentry
=
d
get
(
dentry
)
;
HPPFS_I
(
inode
)
->
proc_dentry
=
d
entry
;
inode
->
i_uid
=
proc_ino
->
i_uid
;
inode
->
i_gid
=
proc_ino
->
i_gid
;
...
...
@@ -737,7 +737,7 @@ static int hppfs_fill_super(struct super_block *sb, void *d, int silent)
sb
->
s_fs_info
=
proc_mnt
;
err
=
-
ENOMEM
;
root_inode
=
get_inode
(
sb
,
proc_mnt
->
mnt_sb
->
s_root
);
root_inode
=
get_inode
(
sb
,
dget
(
proc_mnt
->
mnt_sb
->
s_root
)
);
if
(
!
root_inode
)
goto
out_mntput
;
...
...
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