X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fext3_fs.h;fp=include%2Flinux%2Fext3_fs.h;h=a4c919c22aa83cd71121152dad07e75a5e98b9ac;hb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;hp=0149995124d4546eedaf141865c7ff27c930c754;hpb=1db395853d4f30d6120458bd279ede1f882a8525;p=linux-2.6.git diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 014999512..a4c919c22 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h @@ -507,6 +507,15 @@ static inline struct ext3_inode_info *EXT3_I(struct inode *inode) { return container_of(inode, struct ext3_inode_info, vfs_inode); } + +static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino) +{ + return ino == EXT3_ROOT_INO || + ino == EXT3_JOURNAL_INO || + ino == EXT3_RESIZE_INO || + (ino >= EXT3_FIRST_INO(sb) && + ino <= le32_to_cpu(EXT3_SB(sb)->s_es->s_inodes_count)); +} #else /* Assume that user mode programs are passing in an ext3fs superblock, not * a kernel struct super_block. This will allow us to call the feature-test