Changeset 5ab597d in mainline for uspace/srv/fs/tmpfs/tmpfs_ops.c


Ignore:
Timestamp:
2008-08-22T19:44:52Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
be8f92d
Parents:
2e4bd1f
Message:

Add reference to the mounted FS root.

This makes it possible to keep the FS root logically unlinked (i.e. lnkcnt == 0)
because it prevents VFS from attempting to destroy it during closedir().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/tmpfs/tmpfs_ops.c

    r2e4bd1f r5ab597d  
    234234                return false;
    235235        }
    236         root->lnkcnt = 1;
     236        root->lnkcnt = 0;       /* FS root is not linked */
    237237        return true;
    238238}
     
    406406        if (dev_handle >= 0) {
    407407                if (tmpfs_restore(dev_handle))
    408                         ipc_answer_0(rid, EOK);
     408                        ipc_answer_3(rid, EOK, root->index, root->size,
     409                            root->lnkcnt);
    409410                else
    410411                        ipc_answer_0(rid, ELIMIT);
    411412        } else {
    412                         ipc_answer_0(rid, EOK);
     413                ipc_answer_3(rid, EOK, root->index, root->size, root->lnkcnt);
    413414        }
    414415}
Note: See TracChangeset for help on using the changeset viewer.