Changeset 34b3ce3 in mainline


Ignore:
Timestamp:
2008-05-12T16:16:42Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ace9358
Parents:
929ce92
Message:

Implement fat_node_put() and remove the node from the free node list when
bumping its refernce count from zero in fat_node_get().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_ops.c

    r929ce92 r34b3ce3  
    9292}
    9393
    94 /* TODO and also move somewhere else */
     94/* TODO move somewhere else */
    9595typedef struct {
    9696        void *data;
     
    256256                 * The node is already instantiated in memory.
    257257                 */
    258                 idx->nodep->refcnt++;
     258                if (!idx->nodep->refcnt++)
     259                        list_remove(&nodep->ffn_link);
    259260                return idx->nodep;
    260261        }
     
    316317static void fat_node_put(void *node)
    317318{
    318         /* TODO */
     319        fat_node_t *nodep = (fat_node_t *)node;
     320
     321        if (!--nodep->refcnt) {
     322                list_append(&nodep->ffn_link, &ffn_head);
     323        }
    319324}
    320325
Note: See TracChangeset for help on using the changeset viewer.