Commit f9a62d09 authored by Dan Carpenter's avatar Dan Carpenter Committed by Theodore Ts'o

ext4: use IS_ERR() to check for errors in ext4_error_file

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: default avatarDan Carpenter <error27@gmail.com>
parent 13195184
...@@ -437,7 +437,7 @@ void ext4_error_file(struct file *file, const char *function, ...@@ -437,7 +437,7 @@ void ext4_error_file(struct file *file, const char *function,
save_error_info(inode->i_sb, function, line); save_error_info(inode->i_sb, function, line);
va_start(args, fmt); va_start(args, fmt);
path = d_path(&(file->f_path), pathname, sizeof(pathname)); path = d_path(&(file->f_path), pathname, sizeof(pathname));
if (!path) if (IS_ERR(path))
path = "(unknown)"; path = "(unknown)";
printk(KERN_CRIT printk(KERN_CRIT
"EXT4-fs error (device %s): %s:%d: inode #%lu " "EXT4-fs error (device %s): %s:%d: inode #%lu "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment