]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
vfs: workaround gcc <4.6 build error in link_path_walk()
authorJames Hogan <james.hogan@imgtec.com>
Tue, 16 Sep 2014 12:07:35 +0000 (13:07 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 16 Sep 2014 14:44:54 +0000 (07:44 -0700)
commita060dc5010ffa32f3a83e5336f6eeb6551fa137a
tree363baf07ff23084db68b931266ace0c0ebb91895
parent2856db70990f2fb454c7982e76465b2744753f44
vfs: workaround gcc <4.6 build error in link_path_walk()

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.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676
[2] https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=159206

Fixes: d6bb3e9075bb (vfs: simplify and shrink stack frame of link_path_walk())
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-metag@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/namei.c