From: Richard Yao <ryao@gentoo.org>
To: Richard Yao <ryao@gentoo.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] [readdir] Return correct inode number of .. directory
Date: Thu, 08 Aug 2013 14:45:53 -0400 [thread overview]
Message-ID: <5203E761.9010603@gentoo.org> (raw)
In-Reply-To: <1375987342-47197-1-git-send-email-ryao@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 1229 bytes --]
Ignore that patch. It went out prematurely and unfortunately, it is
wrong. I wrote it when I was debugging an issue where I was seeing the
inode number was not appear in getdents output at userland, but that was
caused by something else.
On 08/08/2013 02:42 PM, Richard Yao wrote:
> dir_emit_dotdot() currently passes parent_ino(file->f_path.dentry) to
> dir_emit(). Passing a dentry to parent_ino() is wrong. This should have
> been parent_ino(file->f_path.dentry->i_ino).
>
> Signed-off-by: Richard Yao <ryao@gentoo.org>
> ---
> include/linux/fs.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 9818747..7495f2e 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2717,7 +2717,7 @@ static inline bool dir_emit_dot(struct file *file, struct dir_context *ctx)
> static inline bool dir_emit_dotdot(struct file *file, struct dir_context *ctx)
> {
> return ctx->actor(ctx, "..", 2, ctx->pos,
> - parent_ino(file->f_path.dentry), DT_DIR) == 0;
> + parent_ino(file->f_path.dentry->i_ino), DT_DIR) == 0;
> }
> static inline bool dir_emit_dots(struct file *file, struct dir_context *ctx)
> {
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
next prev parent reply other threads:[~2013-08-08 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-08 18:42 [PATCH] [readdir] Return correct inode number of .. directory Richard Yao
2013-08-08 18:45 ` Richard Yao [this message]
2013-08-08 19:08 ` Al Viro
2013-08-08 21:10 ` Richard Yao
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=5203E761.9010603@gentoo.org \
--to=ryao@gentoo.org \
--cc=linux-fsdevel@vger.kernel.org \
--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 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.