Generally the inode-number should be unique since it is an identifier within that filesystem. Using a system global function vfs:get_next_ino() may cause the duplicated inode number in tmpfs. If it happens, then some userspace "inum-aware" tools may not work correctly such as backup tools. These patches solve this problem. Changes from v2: - the type of tmpfs inode-number is "signed int" - bugfix about calling idr_remove() in an error path. - bugfix about the error from idr_alloc(). - [2/2] is not changed essentially. J. R. Okajima (2): tmpfs: manage the inode-number by IDR, signed int inum tmpfs: refine a file handle for NFS-exporting include/linux/shmem_fs.h | 6 ++-- mm/shmem.c | 71 +++++++++++++++++++++++++--------------------- 2 files changed, 43 insertions(+), 34 deletions(-) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html