]> git.baikalelectronics.ru Git - kernel.git/commit
kill struct filename.separate
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 23 Feb 2015 01:07:13 +0000 (20:07 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Apr 2015 02:21:24 +0000 (22:21 -0400)
commitfe49bb40816e6966473f6c9c59c90bd11e82b8a6
tree4271223c22f541510331e806ac178df920d3b69c
parentf23465ddf171fffc3282d76813d023e116af26ac
kill struct filename.separate

just make const char iname[] the last member and compare name->name with
name->iname instead of checking name->separate

We need to make sure that out-of-line name doesn't end up allocated adjacent
to struct filename refering to it; fortunately, it's easy to achieve - just
allocate that struct filename with one byte in ->iname[], so that ->iname[0]
will be inside the same object and thus have an address different from that
of out-of-line name [spotted by Boqun Feng <boqun.feng@gmail.com>]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
include/linux/fs.h