static int v9fs_synth_get_dentry(V9fsSynthNode *dir, struct dirent *entry,

                                 struct dirent **result, off_t off)

{

    int i = 0;

    V9fsSynthNode *node;



    rcu_read_lock();

    QLIST_FOREACH(node, &dir->child, sibling) {

        /* This is the off child of the directory */

        if (i == off) {

            break;

        }

        i++;

    }

    rcu_read_unlock();

    if (!node) {

        /* end of directory */

        *result = NULL;

        return 0;

    }

    v9fs_synth_direntry(node, entry, off);

    *result = entry;

    return 0;

}

static int v9fs_synth_get_dentry(V9fsSynthNode *dir, struct dirent *entry,

                                 struct dirent **result, off_t off)

{

    int i = 0;

    V9fsSynthNode *node;



    rcu_read_lock();

    QLIST_FOREACH(node, &dir->child, sibling) {

        

        if (i == off) {

            break;

        }

        i++;

    }

    rcu_read_unlock();

    if (!node) {

        

        *result = NULL;

        return 0;

    }

    v9fs_synth_direntry(node, entry, off);

    *result = entry;

    return 0;

}

static int FUNC_0(V9fsSynthNode *VAR_0, struct dirent *VAR_1,

                                 struct dirent **VAR_2, off_t VAR_3)

{

    int VAR_4 = 0;

    V9fsSynthNode *node;



    rcu_read_lock();

    QLIST_FOREACH(node, &VAR_0->child, sibling) {

        

        if (VAR_4 == VAR_3) {

            break;

        }

        VAR_4++;

    }

    rcu_read_unlock();

    if (!node) {

        

        *VAR_2 = NULL;

        return 0;

    }

    v9fs_synth_direntry(node, VAR_1, VAR_3);

    *VAR_2 = VAR_1;

    return 0;

}

static int FUNC_0(V9fsSynthNode *VAR_0, struct dirent *VAR_1,
struct dirent **VAR_2, off_t VAR_3)
{ int VAR_4 = 0; V9fsSynthNode *node; rcu_read_lock(); QLIST_FOREACH(node, &VAR_0->child, sibling) { if (VAR_4 == VAR_3) { break; } VAR_4++; } rcu_read_unlock(); if (!node) { *VAR_2 = NULL; return 0; } v9fs_synth_direntry(node, VAR_1, VAR_3); *VAR_2 = VAR_1; return 0; }