Re: [PATCH] [readdir] Return correct inode number of .. directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux