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
3a291774
Commit
3a291774
authored
Apr 12, 2018
by
Miklos Szeredi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ovl: add WARN_ON() for non-dir redirect cases
Signed-off-by:
Miklos Szeredi
<
mszeredi@redhat.com
>
parent
0471a9cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
fs/overlayfs/namei.c
fs/overlayfs/namei.c
+11
-0
No files found.
fs/overlayfs/namei.c
View file @
3a291774
...
...
@@ -256,6 +256,12 @@ static int ovl_lookup_single(struct dentry *base, struct ovl_lookup_data *d,
d
->
stop
=
true
;
if
(
d
->
is_dir
)
goto
put_and_out
;
/*
* NB: handle failure to lookup non-last element when non-dir
* redirects become possible
*/
WARN_ON
(
!
last_element
);
goto
out
;
}
if
(
last_element
)
...
...
@@ -1006,6 +1012,11 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
if
(
IS_ERR
(
inode
))
goto
out_free_oe
;
/*
* NB: handle redirected hard links when non-dir redirects
* become possible
*/
WARN_ON
(
OVL_I
(
inode
)
->
redirect
);
OVL_I
(
inode
)
->
redirect
=
upperredirect
;
}
...
...
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