Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2612463imm; Fri, 20 Jul 2018 01:34:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdzmiONZM33mVjQWbLybUIxGJqxy2CUhGjaKRsfYlYOxaQPSUHqykSMVhvyZUpsotLeMvqF X-Received: by 2002:a63:c114:: with SMTP id w20-v6mr1182947pgf.234.1532075667361; Fri, 20 Jul 2018 01:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532075667; cv=none; d=google.com; s=arc-20160816; b=hzroYz0H3IRfiXslGVaXMuc5eP6M3JjFJG+YGOtb2SoKGynnXR+alkK1mLD7W7YOJ8 KAxhMIR5ULwYYpjYS/pWkjnU6a2XAhIE32fFveuDcQaVQf7d2KdRx+Shd93ovPZM38oS rJBP90F6RYLj8qMRcrlGbLElIXaTeznlhvvcQxmKpqy1CseAGfsHEcs5pHLgVrXinr9r DwPAA59MhJDEKo2TcfKOMkS1UGZ12tU2EysEKwqwOFxLhNVqbo8gsafnjS3q5C49YZfx hRfxxAXGy8CyY0nr0Tn3EvoPSijJNPvl6cGrKFvIGiZRU3sVT6ncUjdttKR/8Ns3xoZ2 fppw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=heThlG4C9X6OTYLVo+SUq17JBfMcruPUn1/qWAwnhA0=; b=qVUmlnKd2hsrbT3gL+7CGvzct0zj/brorSYIw8/yrU8WLaxFcmIJuFf3HwG+oYeT/l g/6KibKrAG3lMg3iIBfYoAWPSRl9sYjRddSmsTbtsu48deLhWWmFr7UmkW9Zsn8AbH16 +Yp310gB2MTLdDx7v+Bw23lCk2LS/H2N9ju5g0X2V/fEFFk5XSLhkafxxes0uOtUkiA8 oD/TrKfHNNs6AHxiYLq4JMND1WsonjEpIK/i3pGzUoZN3ZDpERouhGv9XB2atQ18ma5k az7SuP9Dr5qQkut8lNS0ZOfaDQ3vfJoBF9wjQ02dof5Fie+hgGC6XANtSvFRDMol1hMx QlPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=CDszI3Q+; 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 h16-v6si1306627pli.14.2018.07.20.01.34.12; Fri, 20 Jul 2018 01:34:27 -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; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=CDszI3Q+; 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 S1729070AbeGTJTt (ORCPT + 99 others); Fri, 20 Jul 2018 05:19:49 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:42064 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728170AbeGTJTs (ORCPT ); Fri, 20 Jul 2018 05:19:48 -0400 Received: by mail-oi0-f68.google.com with SMTP id n84-v6so19930554oib.9 for ; Fri, 20 Jul 2018 01:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=heThlG4C9X6OTYLVo+SUq17JBfMcruPUn1/qWAwnhA0=; b=CDszI3Q+/9qupKCNS/a5m3ABBhfVdLxbGvwtfTfAZkalrNQge4skOKO+QFEJpUcdcD XvO4g0aM4jdiMGAcyd8c+whKXrbxL2ZtRAcMZy8aCyvpl8RB46RsC6pxnrPE0oqeZmmz RNuCorkTFAIrFOGDiq7i7QkJe47I/+VZAd48Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=heThlG4C9X6OTYLVo+SUq17JBfMcruPUn1/qWAwnhA0=; b=epERb1r8jqdcMdkeylsQRNxqKVjR9x9rnAJGPCU5ow2+deecwKjDkI3rMD7Ro1BXqI rjK+5W1d740kF/F0r2Kbw1kWNrLZ8rBCDsstCxrevUdRn48WwqOHLIxoZmeinSq503hv x1bzJmhZvHJyV8l69SBQ8tVVfulZmEqv7S0w1OqwP6uyRE9J7+uMhFV/Cnps6z1nO/DH WJkoePWj4mJUcMuUutHd9dCVOzGWC1igKohAxqMsLaLehPx+hesCwqIEO/jFtUdrZefU FHKAvQwi7f1iimE3ddkTf0dkcQHYDpUjBvyA9aebyPPdVTDb3l2+CAB/WgfTRENQt+nL tkzQ== X-Gm-Message-State: AOUpUlG+Ly/3aQ088LCbwXYuuAHYOviiRPTs1v+rliTj1GBSoLH60G4t VQi5r+/mf/SFbExutpSxezHu98+KoWxCnFTq0OM4QQ== X-Received: by 2002:aca:a64d:: with SMTP id p74-v6mr1015740oie.149.1532075558431; Fri, 20 Jul 2018 01:32:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:113c:0:0:0:0:0 with HTTP; Fri, 20 Jul 2018 01:32:37 -0700 (PDT) X-Originating-IP: [212.96.48.140] In-Reply-To: <20180719214519.GA23379@ZenIV.linux.org.uk> References: <20180706204521.29654-1-mszeredi@redhat.com> <20180718121833.GR30522@ZenIV.linux.org.uk> <20180719214519.GA23379@ZenIV.linux.org.uk> From: Miklos Szeredi Date: Fri, 20 Jul 2018 10:32:37 +0200 Message-ID: Subject: Re: [PATCH v2 (v4.18 regression fix)] vfs: don't evict uninitialized inode To: Al Viro Cc: Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 11:45 PM, Al Viro wrote: > On Wed, Jul 18, 2018 at 01:18:33PM +0100, Al Viro wrote: > >> BTW, why have you left generic_readlink() sitting around? AFAICS, >> it could've been folded into the only remaining caller just as >> you've made it static in late 2016... I'll fold it in; >> just curious what was the reason for not doing that back then... > > BTW^2: > const char *vfs_get_link(struct dentry *dentry, struct delayed_call *done) > { > const char *res = ERR_PTR(-EINVAL); > struct inode *inode = d_inode(dentry); > > if (d_is_symlink(dentry)) { > res = ERR_PTR(security_inode_readlink(dentry)); > if (!res) > res = inode->i_op->get_link(dentry, inode, done); > } > return res; > } > hits a method call that is not needed in the majority of cases. Is there > any subtle reason why it shouldn't be > > const char *vfs_get_link(struct dentry *dentry, struct delayed_call *done) > { > const char *res = ERR_PTR(-EINVAL); > struct inode *inode = d_inode(dentry); > > if (d_is_symlink(dentry)) { > res = ERR_PTR(security_inode_readlink(dentry)); > if (!res) > res = inode->i_link; > if (!res) > res = inode->i_op->get_link(dentry, inode, done); > } > return res; > } > instead? Can't see any issues. But I also don't think any of the callers are seriously performance sensitive, so I guess it basically doesn't matter. Thanks, Miklos