Ticket #411: imfs_unlink.c.diff

File imfs_unlink.c.diff, 962 bytes (added by ptorre, on Dec 3, 2006 at 1:31:12 PM)

imfs_unlink.c.diff

  • /

    old new  
    5757     *  If removing the last hard link to a node, then we need
    5858     *  to remove the node that is a link and the node itself.
    5959     */
    60 
    61     node->info.hard_link.link_node->st_nlink --;
    62     IMFS_update_ctime( node->info.hard_link.link_node );
    63     if ( node->info.hard_link.link_node->st_nlink < 1) {
    64       result = (*the_link.handlers->rmnod_h)( &the_link );
    65       if ( result != 0 )
    66         return -1;
     60    if ( node->info.hard_link.link_node->st_nlink == 1)
     61    {
     62        result = (*the_link.handlers->rmnod_h)( &the_link );
     63        if ( result != 0 )
     64            return -1;
     65    }
     66    else
     67    {
     68        node->info.hard_link.link_node->st_nlink --;
     69        IMFS_update_ctime( node->info.hard_link.link_node );
    6770    }
    6871  }
    6972