linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: James Hogan <james.hogan@imgtec.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-fsdevel@vger.kernel.org, linux-metag@vger.kernel.org
Subject: Re: [PATCH] vfs: workaround gcc <4.6 build error in link_path_walk()
Date: Tue, 16 Sep 2014 18:39:51 +0100	[thread overview]
Message-ID: <20140916173951.GX7996@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1410869255-8506-1-git-send-email-james.hogan@imgtec.com>

On Tue, Sep 16, 2014 at 01:07:35PM +0100, James Hogan wrote:
> Commit d6bb3e9075bb (vfs: simplify and shrink stack frame of
> link_path_walk()) introduced build problems with GCC versions older than
> 4.6 due to the initialisation of a member of an anonymous union in
> struct qstr without enclosing braces.
> 
> This hits GCC bug 10676 [1] (which was fixed in GCC 4.6 by [2]), and
> causes the following build error:
>   fs/namei.c: In function 'link_path_walk':
>   fs/namei.c:1778: error: unknown field 'hash_len' specified in initializer
> 
> This is worked around by adding explicit braces.

IOW, the same thing QSTR_INIT is doing...  BTW, after looking at the commit
in question, what the hell was this
+                               name = this.name;
in link_path_walk() about?  Granted, none of the ->d_hash() instances in
the tree reassign qstr->name, and out-of-tree ones are unlikely to do it
either, so it's harmless but... why bother rereading this.name at all?
Linus?

  reply	other threads:[~2014-09-16 17:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-16 12:07 [PATCH] vfs: workaround gcc <4.6 build error in link_path_walk() James Hogan
2014-09-16 17:39 ` Al Viro [this message]
2014-09-17 14:05   ` James Hogan

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=20140916173951.GX7996@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=geert@linux-m68k.org \
    --cc=james.hogan@imgtec.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-metag@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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).