Ignore:
Timestamp:
Jul 19, 2017, 3:31:39 PM (5 years ago)
Author:
alain
Message:

Fixing bugs in vfs_lookup()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/mapper.c

    r204 r238  
    164164        page = grdxt_lookup( &mapper->radix , index );
    165165
    166         if ( page == NULL )   // missing page => load it from file system
     166        if ( page == NULL )   // missing page => create it and load it from file system
    167167        {
    168168            mapper_dmsg("\n[INFO] %s : missing page => load from FS\n", __FUNCTION__ );
     
    208208            }
    209209
     210            // update the mapper and index fields in page descriptor
     211            // required by the vfs_move_page_to_mapper()
     212            page->mapper = mapper;
     213            page->index  = index;
     214
    210215            // launch I/O operation to load page from file system
    211             error = vfs_move_page_to_mapper( page );
     216            error = vfs_mapper_move_page( page , true );   // to mapper
    212217
    213218            if( error )
     
    223228            }
    224229
    225             // update the mapper and index fields in page descriptor
    226             page->mapper = mapper;
    227             page->index  = index;
    228 
    229230            // reset the page INLOAD flag to make the page available to all readers
    230231            page_clear_flag( page , PG_INLOAD );
     
    267268
    268269    // lauch IO operation to update page to file system
    269     error = vfs_move_page_from_mapper( page );
     270    error = vfs_mapper_move_page( page , false );    // from mapper
    270271
    271272    if( error )
Note: See TracChangeset for help on using the changeset viewer.