[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190924020348.GD26530@ZenIV.linux.org.uk>
Date: Tue, 24 Sep 2019 03:03:48 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: John Johansen <john.johansen@...onical.com>
Cc: linux-kernel@...r.kernel.org
Subject: [WTF?] aafs_create_symlink() weirdness
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?
Powered by blists - more mailing lists