]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
commitdbc6e0222d79e78925fe20733844a796a4b72cf9
tree49eabccaa420103bd5ecddc2b77bc916440db812
parent06fd516c1a504828780fcd81dfe21f94dec4c868
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