Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs_rw.c

    r36cb22f r7a46bfe  
    3131 */
    3232
    33 #include <align.h>
    3433#include "mfs.h"
    3534
     
    5453 *bytes, this function returns the on-disk block
    5554 *relative to that position.
    56  *
    57  * @param b     Pointer to a 32bit number where the block number will be stored
    58  * @param mnode Pointer to a generic MINIX inode in memory.
    59  * @param pos   Position in file.
    60  *
    61  * @return      EOK on success or a negative error code.
     55 *Returns zero if the block does not exist.
    6256 */
    6357int
     
    7165        int rblock = pos / block_size;
    7266
    73         if (ROUND_UP(mnode->ino_i->i_size, sbi->block_size) < pos) {
     67        if (mnode->ino_i->i_size < pos) {
    7468                /*Trying to read beyond the end of file*/
    7569                r = EOK;
     
    233227}
    234228
    235 /**Free unused indirect zones from a MINIX inode according to it's new size.
    236  *
    237  * @param mnode         Pointer to a generic MINIX inode in memory.
    238  * @param new_size      The new size of the inode.
    239  *
    240  * @return              EOK on success or a negative error code.
    241  */
     229/*Free unused indirect zones*/
    242230int
    243231mfs_prune_ind_zones(struct mfs_node *mnode, size_t new_size)
     
    251239        mfs_version_t fs_version = sbi->fs_version;
    252240       
    253         assert(new_size <= ino_i->i_size);
    254 
    255241        if (fs_version == MFS_VERSION_V1) {
    256242                nr_direct = V1_NR_DIRECT_ZONES;
Note: See TracChangeset for help on using the changeset viewer.