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
40b39136
Commit
40b39136
authored
Mar 09, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
path_openat: clean ELOOP handling a bit
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
f374ed5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
fs/namei.c
fs/namei.c
+6
-8
No files found.
fs/namei.c
View file @
40b39136
...
...
@@ -2320,11 +2320,12 @@ static struct file *path_openat(int dfd, const char *pathname,
struct
path
link
=
path
;
struct
inode
*
linki
=
link
.
dentry
->
d_inode
;
void
*
cookie
;
error
=
-
ELOOP
;
if
(
!
(
nd
.
flags
&
LOOKUP_FOLLOW
))
goto
exit_dput
;
if
(
count
++
==
32
)
goto
exit_dput
;
if
(
!
(
nd
.
flags
&
LOOKUP_FOLLOW
)
||
count
++
==
32
)
{
path_put_conditional
(
&
path
,
&
nd
);
path_put
(
&
nd
.
path
);
filp
=
ERR_PTR
(
-
ELOOP
);
break
;
}
/*
* This is subtle. Instead of calling do_follow_link() we do
* the thing by hands. The reason is that this way we have zero
...
...
@@ -2355,9 +2356,6 @@ static struct file *path_openat(int dfd, const char *pathname,
release_open_intent
(
&
nd
);
return
filp
;
exit_dput:
path_put_conditional
(
&
path
,
&
nd
);
path_put
(
&
nd
.
path
);
out_filp:
filp
=
ERR_PTR
(
error
);
goto
out
;
...
...
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