Ignore:
Timestamp:
Mar 6, 2019, 4:37:15 PM (5 years ago)
Author:
alain
Message:

Introduce three new types of vsegs (KCODE,KDATA,KDEV)
to map the kernel vsegs in the process VSL and GPT.
This now used by both the TSAR and the I86 architectures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_write.c

    r610 r623  
    173173        }
    174174
    175         // update size field in inode if required
    176         xptr_t   size_xp    = XPTR( file_cxy , &inode_ptr->size );
    177         uint32_t inode_size = hal_remote_l32( size_xp );
    178         if ( (file_offset + count) > inode_size )
    179         {
    180             hal_remote_s32( size_xp , file_offset + count );
    181         }
     175        // update file size in inode descriptor
     176        // only if (file_offset + count) > current_size
     177        // note: the parent directory entry in mapper will
     178        // be updated by the close syscall     
     179        xptr_t inode_xp = XPTR( file_cxy , inode_ptr );
     180        vfs_inode_update_size( inode_xp , file_offset + count );
     181
    182182    }
    183183    else if( file_type == INODE_TYPE_DEV )  // write to TXT device
Note: See TracChangeset for help on using the changeset viewer.