]> git.baikalelectronics.ru Git - kernel.git/commit
delousing target_core_file a bit
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 1 Aug 2012 09:07:04 +0000 (13:07 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 1 Aug 2012 12:53:16 +0000 (16:53 +0400)
commit43802ac45fdac215ddbe54d141d433b29c1f443f
tree49eabccaa420103bd5ecddc2b77bc916440db812
parent0210b5ea6d49e974e39564c961daf622e05b90ab
delousing target_core_file a bit

* set_fs(KERNEL_DS) + getname() is probably the weirdest implementation
of strdup() I've seen.  Especially since they don't to copy it at all...
* filp_open() never returns NULL; it's ERR_PTR(-E...) on failure.
* file->f_dentry is never going to be NULL, TYVM.
* match_strdup() + snprintf() + kfree() is a bloody weird way to spell
match_strlcpy().

Pox on cargo-cult programmers...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/target/target_core_file.c