Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1394110ybn; Wed, 25 Sep 2019 17:41:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjnubeVFWHPSgqm2bIFoz0dVjyDll/CnP9ulfe95hGw2RNEQmP83FmA+4HYhXgkE+IzAvt X-Received: by 2002:a17:906:6d4:: with SMTP id v20mr797384ejb.223.1569458475265; Wed, 25 Sep 2019 17:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569458475; cv=none; d=google.com; s=arc-20160816; b=KDuq0394zODbm13NW9nwhOlc7TwsbxD09Fc0d8lz2UxkxJ7FIN7feoKU40BpxjwZdD Q7sEuQIqOe+Js4lp53hNzxj9fo8eKcigRxWY5NCTUYDpNtSq0jDX2ANa5fqVe4XYWLsd UZQn4DhlhpGEPwOh8qwqQWFJIFUA5GxYMaHpvhan/ryR7l9DK6r7l0tYZrY4h+ECzbpI eMOV3D2/55H2k2eLnDqEcZc1TEzadKojEXeVQOURPtULip/qpQAzs7lPimJTzwV8soEU 4JwkRbP23tUGy2UlEHOHaN7fHEVahlHp8FpxkNyZ7iKwu0Mt8D+WuwLmK6GD3SJ99BIU P9Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=wuOg7jWGinLx6NPy7CQT3p1m6/GE/ULL55QXtu6J+0A=; b=xeVlvfJ2aMIw630cfaaE0Zh1tq3afmX1e8Gs9h3JRqxsQRUmFYEvK5JXSAU4lLbeaR WLhy+QE7gASFcrdbZxOPfLy79s1Hbtu5HskQ20hWopcNk4cyD+xom355qoXo6yEYzfQk arGCvTTvO/hq0UTjKopbMkzIwJydfZ9ZoK8kdNFIzqmx0zK0Z8eyKpxZtUKSegTIZQP3 xcTuUbPeYLOMzYsgJrC08DscnWUjwEGzJCfbUBxh9y4hSJgoL4qo2Hfqs8ny21/g+O2M SMakhFiNNZkZPxW7KwxhK9hvfGeOj/4qQWN5JLq9xKZbETRxBn5RxTT54Ht0hXTbrS02 VSvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8si383535edb.335.2019.09.25.17.40.51; Wed, 25 Sep 2019 17:41:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408492AbfIXCDw (ORCPT + 99 others); Mon, 23 Sep 2019 22:03:52 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:41182 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729136AbfIXCDw (ORCPT ); Mon, 23 Sep 2019 22:03:52 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iCaBB-0001ux-0a; Tue, 24 Sep 2019 02:03:49 +0000 Date: Tue, 24 Sep 2019 03:03:48 +0100 From: Al Viro To: John Johansen Cc: linux-kernel@vger.kernel.org Subject: [WTF?] aafs_create_symlink() weirdness Message-ID: <20190924020348.GD26530@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?