]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - fs/inode.c
vfs: avoid creation of inode number 0 in get_next_ino
authorCarlos Maiolino <cmaiolino@redhat.com>
Thu, 25 Jun 2015 15:25:58 +0000 (12:25 -0300)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 1 Jul 2015 03:59:49 +0000 (23:59 -0400)
commit2adc376c551943a07170cbe70f43e6d6065f8906
treef73e93d10b925e5e0e3a8e47f62a6d58b213da66
parent06d7137e5c566e1e8a4acd4a30e7e12170a57b58
vfs: avoid creation of inode number 0 in get_next_ino

currently, get_next_ino() is able to create inodes with inode number = 0.
This have a bad impact in the filesystems relying in this function to generate
inode numbers.

While there is no problem at all in having inodes with number 0, userspace tools
which handle file management tasks can have problems handling these files, like
for example, the impossiblity of users to delete these files, since glibc will
ignore them. So, I believe the best way is kernel to avoid creating them.

This problem has been raised previously, but the old thread didn't have any
other update for a year+, and I've seen too many users hitting the same issue
regarding the impossibility to delete files while using filesystems relying on
this function. So, I'm starting the thread again, with the same patch
that I believe is enough to address this problem.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/inode.c