Changeset 0c2241c in rtems
- Timestamp:
- 10/10/17 23:11:49 (6 years ago)
- Branches:
- 5, master
- Children:
- 095a807
- Parents:
- 343f2084
- git-author:
- Fan Deng <enetor@…> (10/10/17 23:11:49)
- git-committer:
- Chris Johns <chrisj@…> (04/11/18 01:51:57)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libfs/src/rfs/rtems-rfs-group.c
r343f2084 r0c2241c 168 168 } 169 169 else 170 { 170 171 size = fs->group_blocks; 172 /* 173 * It is possible for 'goal' to be zero. Any newly created inode will have 174 * its 'last_data_block' set to zero, which is then used as 'goal' to 175 * allocate new blocks. When that happens, we simply set 'goal' to zero and 176 * continue the search from there. 177 */ 178 if (goal >= RTEMS_RFS_ROOT_INO) 179 goal -= RTEMS_RFS_ROOT_INO; 180 } 171 181 172 182 group_start = goal / size; … … 325 335 else 326 336 { 327 if ( no >= rtems_rfs_fs_blocks (fs))337 if ((no < RTEMS_RFS_ROOT_INO) || (no >= rtems_rfs_fs_blocks (fs))) 328 338 return EINVAL; 339 no -= RTEMS_RFS_ROOT_INO; 329 340 size = fs->group_blocks; 330 341 }
Note: See TracChangeset
for help on using the changeset viewer.