From: Miklos Szeredi <miklos@szeredi.hu>
To: Al Viro <viro@zeniv.linux.org.uk>
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: Fri, 20 Jul 2018 10:32:37 +0200 [thread overview]
Message-ID: <CAJfpegtNMrFfwXjP8tMb0NvO=paDpESRBfueBit6mW2e7djhZg@mail.gmail.com> (raw)
In-Reply-To: <20180719214519.GA23379@ZenIV.linux.org.uk>
On Thu, Jul 19, 2018 at 11:45 PM, Al Viro <viro@zeniv.linux.org.uk> 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
prev parent reply other threads:[~2018-07-20 8:32 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
2018-07-20 8:32 ` Miklos Szeredi [this message]
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='CAJfpegtNMrFfwXjP8tMb0NvO=paDpESRBfueBit6mW2e7djhZg@mail.gmail.com' \
--to=miklos@szeredi.hu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mszeredi@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).