public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [WTF?] aafs_create_symlink() weirdness
@ 2019-09-24  2:03 Al Viro
  2019-09-24 17:01 ` John Johansen
  0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2019-09-24  2:03 UTC (permalink / raw)
  To: John Johansen; +Cc: linux-kernel


static struct dentry *aafs_create_symlink(const char *name,
                                          struct dentry *parent,
                                          const char *target,
                                          void *private,
                                          const struct inode_operations *iops)
{
        struct dentry *dent;
        char *link = NULL;

        if (target) {
                if (!link)
                        return ERR_PTR(-ENOMEM);
        }

Er...  That's an odd way to spell
	if (target)
		return ERR_PTR(-ENOMEM);
(and an odd error value to use).  Especially since all callers are passing
NULL as target.

Why is that code even there, why does that argument still exist and
how many people have actually read that function?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-24 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-24  2:03 [WTF?] aafs_create_symlink() weirdness Al Viro
2019-09-24 17:01 ` John Johansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox