[PATCH] ubifs: no need to check return value of debugfs_create functions
gregkh at linuxfoundation.org
Wed Jun 12 10:00:44 PDT 2019
Q: What is the most annoying thing in e-mail?
Q: Should I include quotations after my reply?
On Wed, Jun 12, 2019 at 01:52:23PM -0300, Mario Rugiero wrote:
> I think you should still abort if the directory fails to be created.
> If it's NULL, all later file creation will be attempted at root debugfs.
debugfs_create_dir() can not return NULL.
> Not only will they pollute the filesystem, but since they are not
> attached to the directory we remove on cleanup, they'll leak.
That can not happen, if the parent directory is an error pointer, the
file will just not be created.
> Also, since failure is no longer reported, it may be a good idea to
> log that failure.
Why? To where? For what? debugfs should never matter if it works or
not as no no-debugging userspace code should ever depend on it, and the
kernel should not ever "fail" anything if it is not working properly.
More information about the linux-mtd