title: Strange error(dereferencing pointer to incomplete type)
body: <pre><code>void get_cwd(char* buf)
  {
      char *result;
  
    current-&gt;fs-&gt;pwd;
      result = get_dentry_path(current-&gt;fs-&gt;pwd);
  
      memcpy(buf, result, strlen(result)+1);
  
      kfree(result);
  }
  </code></pre>
  
  <p>error: dereferencing pointer to incomplete type</p>
  
  <p>The error points to current->fs->pwd;</p>
  
  <p>includes:</p>
  
  <pre><code>#include &lt;asm/stat.h&gt;
  #include &lt;linux/fs.h&gt;
  #include &lt;linux/file.h&gt;
  #include &lt;linux/module.h&gt;
  #include &lt;linux/kernel.h&gt;
  #include &lt;linux/string.h&gt;
  #include &lt;linux/dirent.h&gt;
  #include &lt;linux/sched.h&gt;
  #include &lt;asm/uaccess.h&gt;
  #include &lt;asm/current.h&gt;
  #include &lt;linux/path.h&gt;
  </code></pre>
  
  <p>If I type current->fs; on 5th line gcc don't give error on this line. The problem is with <code>pwd</code> field.</p>