Searched hist:"8529 f613b6945f4b5bd8c1b69e42aa1cc51b2eb6" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/ |
H A D | stat.c | diff 8529f613b6945f4b5bd8c1b69e42aa1cc51b2eb6 Sun May 06 20:02:40 CDT 2012 Linus Torvalds <torvalds@linux-foundation.org> vfs: don't force a big memset of stat data just to clear padding fields
Admittedly this is something that the compiler should be able to just do for us, but gcc just isn't that smart. And trying to use a structure initializer (which would get us the right semantics) ends up resulting in gcc allocating stack space for _two_ 'struct stat', and then copying one into the other.
So do it by hand - just have a per-architecture macro that initializes the padding fields. And if the architecture doesn't provide one, fall back to the old behavior of just doing the whole memset() first.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|