Whamcloud - gitweb
ext2fs_new_inode(): Add sanity check to assure a valid inode number
authorTheodore Ts'o <tytso@mit.edu>
Thu, 22 Jan 2009 20:55:49 +0000 (15:55 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 22 Jan 2009 20:55:49 +0000 (15:55 -0500)
commita93d40696073076b26bc11052f7cc99588d74dae
tree3710a5753240695a7fc5dd0fb21db70f66df9f87
parent1f790a7cc1fbb0dc2d2f621d2508f52a62f80150
ext2fs_new_inode(): Add sanity check to assure a valid inode number

Add a sanity check to makesure that even if the superblock field
s_first_inode is insane, that we won't return an invalid inode number.
(The function will return the error EXT2_ET_INODE_ALLOC_FAIL in that
case.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/alloc.c