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
aec225ad
Commit
aec225ad
authored
Mar 03, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Mar 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] d_alloc_root() fixes: autofs4
- oops if inode allocation fails.
parent
02b90ad2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
fs/autofs4/inode.c
fs/autofs4/inode.c
+3
-9
No files found.
fs/autofs4/inode.c
View file @
aec225ad
...
@@ -213,6 +213,9 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
...
@@ -213,6 +213,9 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
* Get the root inode and dentry, but defer checking for errors.
* Get the root inode and dentry, but defer checking for errors.
*/
*/
root_inode
=
autofs4_get_inode
(
s
,
autofs4_mkroot
(
sbi
));
root_inode
=
autofs4_get_inode
(
s
,
autofs4_mkroot
(
sbi
));
if
(
!
root_inode
)
goto
fail_free
;
root_inode
->
i_op
=
&
autofs4_root_inode_operations
;
root_inode
->
i_op
=
&
autofs4_root_inode_operations
;
root_inode
->
i_fop
=
&
autofs4_root_operations
;
root_inode
->
i_fop
=
&
autofs4_root_operations
;
root
=
d_alloc_root
(
root_inode
);
root
=
d_alloc_root
(
root_inode
);
...
@@ -264,22 +267,13 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
...
@@ -264,22 +267,13 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
*/
*/
fail_fput:
fail_fput:
printk
(
"autofs: pipe file descriptor does not contain proper ops
\n
"
);
printk
(
"autofs: pipe file descriptor does not contain proper ops
\n
"
);
/*
* fput() can block, so we clear the super block first.
*/
fput
(
pipe
);
fput
(
pipe
);
/* fall through */
/* fall through */
fail_dput:
fail_dput:
/*
* dput() can block, so we clear the super block first.
*/
dput
(
root
);
dput
(
root
);
goto
fail_free
;
goto
fail_free
;
fail_iput:
fail_iput:
printk
(
"autofs: get root dentry failed
\n
"
);
printk
(
"autofs: get root dentry failed
\n
"
);
/*
* iput() can block, so we clear the super block first.
*/
iput
(
root_inode
);
iput
(
root_inode
);
fail_free:
fail_free:
kfree
(
sbi
);
kfree
(
sbi
);
...
...
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