From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Yao Subject: Re: [PATCH] [readdir] Return correct inode number of .. directory Date: Thu, 08 Aug 2013 14:45:53 -0400 Message-ID: <5203E761.9010603@gentoo.org> References: <1375987342-47197-1-git-send-email-ryao@gentoo.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2EEFCNCWBEIVOUIQFLJNL" Cc: Alexander Viro , linux-fsdevel@vger.kernel.org To: Richard Yao Return-path: Received: from smtp.gentoo.org ([140.211.166.183]:48446 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966070Ab3HHSqS (ORCPT ); Thu, 8 Aug 2013 14:46:18 -0400 In-Reply-To: <1375987342-47197-1-git-send-email-ryao@gentoo.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2EEFCNCWBEIVOUIQFLJNL Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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). >=20 > Signed-off-by: Richard Yao > --- > include/linux/fs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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_conte= xt *ctx) > { > return ctx->actor(ctx, "..", 2, ctx->pos, > - parent_ino(file->f_path.dentry), DT_DIR) =3D=3D 0; > + parent_ino(file->f_path.dentry->i_ino), DT_DIR) =3D=3D 0; > } > static inline bool dir_emit_dots(struct file *file, struct dir_context= *ctx) > { >=20 ------enig2EEFCNCWBEIVOUIQFLJNL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSA+dmAAoJECDuEZm+6ExkjhEP/10kRTl3go2961z1aX+yHB8q NhKJdHYRTZnAX4HCQRP6rp34I/KnZttfKJRtRXteyRvra6IMF/JirIixWInyIPFH wzWObKhyWpfx83aOxfqKdbbPUCoGSDoXxDtLMwbaQbo4rETOVm6aN/gAqSvzK1RT dqZWmc84Z5GzchxjkQ9wh8LWbzMpO203swvrh50sBKmHD7OgbC/l+eTn1zc055MA kjBa4MzX8tdFfDjZA3N9BBxPj0P6tgRyRrgOuqx+6ESeg+f3ES9ho6FKyhMbgNg2 118Ml4ytUMDpqrDSUsefIFw9zlehLAqOvL9yEgb+XVOaym5mSXR6COioYY4BsMih 5GULkCqzEe+zXs2VYLAJ8kLu8HEar0xSXkREGHH994U6bvCAYpITNflvxY/prW9U +Rm2yERE35nS3CylnjNY1/Z8/eiGGOuHj+SIFvd2Ur6f5ZfqOhPpWlrWNtOeoir3 xkBKhj3vKDDvjB9W2nVXmcKG83ltj6axQreOhHUW/lvk1xAMUGYRMu+CqtAh0Ee1 RvHNi8D6b3Of8kCz8W6yPyudnG4wcLq9PrF7O9ofQi9PwdWDpqdp6QpqUevrWBSl h8tD3gDsQ3LdoRjtPUakgw/15dFnXYYtyWYwXjwnwuC20fbcw33OyXR4JR7Q07na R8XiZ+ecWbNH3D5lTEiH =50XP -----END PGP SIGNATURE----- ------enig2EEFCNCWBEIVOUIQFLJNL--