From: Al Viro <viro@ZenIV.linux.org.uk>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Miklos Szeredi <mszeredi@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 (v4.18 regression fix)] vfs: don't evict uninitialized inode
Date: Thu, 19 Jul 2018 22:45:20 +0100 [thread overview]
Message-ID: <20180719214519.GA23379@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20180718121833.GR30522@ZenIV.linux.org.uk>
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?
next prev parent reply other threads:[~2018-07-19 22:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 20:45 [PATCH v2 (v4.18 regression fix)] vfs: don't evict uninitialized inode Miklos Szeredi
2018-07-12 16:29 ` Amir Goldstein
2018-07-18 11:40 ` Miklos Szeredi
2018-07-18 12:18 ` Al Viro
2018-07-18 12:24 ` Miklos Szeredi
2018-07-19 21:45 ` Al Viro [this message]
2018-07-20 8:32 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180719214519.GA23379@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mszeredi@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.