Messages in this thread | | | Date | Tue, 24 Sep 2019 03:03:48 +0100 | From | Al Viro <> | 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?
| |