* [patch] ext4: checking NULL instead of ERR_PTR
@ 2010-08-26 9:16 Dan Carpenter
2010-12-30 3:55 ` Ted Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-08-26 9:16 UTC (permalink / raw)
To: Theodore Ts'o
Cc: Andreas Dilger, Jan Kara, Christoph Hellwig, Eric Sandeen,
Dmitry Monakhov, linux-ext4, kernel-janitors
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 <error27@gmail.com>
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 2614774..efaa27e 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -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 "
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] ext4: checking NULL instead of ERR_PTR
2010-08-26 9:16 [patch] ext4: checking NULL instead of ERR_PTR Dan Carpenter
@ 2010-12-30 3:55 ` Ted Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Ted Ts'o @ 2010-12-30 3:55 UTC (permalink / raw)
To: Dan Carpenter
Cc: Andreas Dilger, Jan Kara, Christoph Hellwig, Eric Sandeen,
Dmitry Monakhov, linux-ext4, kernel-janitors
On Thu, Aug 26, 2010 at 11:16:54AM +0200, Dan Carpenter wrote:
> 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 <error27@gmail.com>
Thanks, I've added this to the ext4 patch tree.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-30 3:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-26 9:16 [patch] ext4: checking NULL instead of ERR_PTR Dan Carpenter
2010-12-30 3:55 ` Ted Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).