ext4: checking NULL instead of ERR_PTR
Subsystems (2)
PATCH 1/1 ext4: checking NULL instead of ERR_PTR
d_path() returns an ERR_PTR and it doesn't return NULL. This is in ext4_error_file() and no one actually calls ext4_error_file().
Signed-off-by Dan Carpenter <[email protected]>
fs/ext4/super.c +1 -1
@@ -429,7 +429,7 @@ void ext4_error_file(struct file *file, const char *function,save_error_info (inode->i_sb, function, line);va_start (args, fmt); path =d_path (&(file->f_path), pathname,sizeof (pathname)); -if (!path) +if (IS_ERR (path)) path ="(unknown)" ;printk (KERN_CRIT "EXT4-fs error (device %s): %s:%d: inode #%lu "
Ted Ts'o
maintainerQuoted 4 lines · Dan Carpenter
d_path()returns anERR_PTRand it doesn't return NULL. This is inext4_error_file()and no one actually callsext4_error_file().Signed-off-by Dan Carpenter <[email protected]>
Thanks, I've added this to the ext4 patch tree.
- Ted