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
1eae9a47
Commit
1eae9a47
authored
Nov 11, 2023
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
/proc/sys: use d_splice_alias() calling conventions to simplify failure exits
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
6f36230e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
fs/proc/proc_sysctl.c
fs/proc/proc_sysctl.c
+2
-12
No files found.
fs/proc/proc_sysctl.c
View file @
1eae9a47
...
...
@@ -534,13 +534,8 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry,
goto
out
;
}
inode
=
proc_sys_make_inode
(
dir
->
i_sb
,
h
?
h
:
head
,
p
);
if
(
IS_ERR
(
inode
))
{
err
=
ERR_CAST
(
inode
);
goto
out
;
}
d_set_d_op
(
dentry
,
&
proc_sys_dentry_operations
);
inode
=
proc_sys_make_inode
(
dir
->
i_sb
,
h
?
h
:
head
,
p
);
err
=
d_splice_alias
(
inode
,
dentry
);
out:
...
...
@@ -698,13 +693,8 @@ static bool proc_sys_fill_cache(struct file *file,
return
false
;
if
(
d_in_lookup
(
child
))
{
struct
dentry
*
res
;
inode
=
proc_sys_make_inode
(
dir
->
d_sb
,
head
,
table
);
if
(
IS_ERR
(
inode
))
{
d_lookup_done
(
child
);
dput
(
child
);
return
false
;
}
d_set_d_op
(
child
,
&
proc_sys_dentry_operations
);
inode
=
proc_sys_make_inode
(
dir
->
d_sb
,
head
,
table
);
res
=
d_splice_alias
(
inode
,
child
);
d_lookup_done
(
child
);
if
(
unlikely
(
res
))
{
...
...
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