projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4a4f21
)
putname(): IS_ERR_OR_NULL() is wrong here
author
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 7 Sep 2021 20:14:05 +0000
(16:14 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 7 Sep 2021 20:14:05 +0000
(16:14 -0400)
Mixing NULL and ERR_PTR() just in case is a Bad Idea(tm). For
struct filename the former is wrong - failures are reported
as ERR_PTR(...), not as NULL.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
patch
|
blob
|
history
diff --git
a/fs/namei.c
b/fs/namei.c
index bbb5c9bf5c61e2420954ecc5f1738ad77b74fbfc..1946d966779088856649630a6172588e3b2f23c8 100644
(file)
--- a/
fs/namei.c
+++ b/
fs/namei.c
@@
-255,7
+255,7
@@
getname_kernel(const char * filename)
void putname(struct filename *name)
{
- if (IS_ERR
_OR_NULL
(name))
+ if (IS_ERR(name))
return;
BUG_ON(name->refcnt <= 0);