summary refs log tree commit diff
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-09-07 16:14:05 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2021-09-07 16:14:05 -0400
commitea47ab111669b187808b3080602788dec26cb9bc (patch)
treedb4f163675e6f72f3a9f59d5509f4e8b80b903c9 /fs
parentb4a4f213a39d5e55baf38c96042acaeaf927ec74 (diff)
downloadlinux-ea47ab111669b187808b3080602788dec26cb9bc.tar.gz
putname(): IS_ERR_OR_NULL() is wrong here
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index bbb5c9bf5c61..1946d9667790 100644
--- 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);