title: Has there ever been a unix system call to create a link from an open file descriptor?
body: <p>There has been a trend over the past few years to create more "f" system calls such as fstat, fchmod, ftruncate, etc.  which perform operations on an inode that is identified to by an open file descriptor, rather than one that is identified by a path.</p>
  
  <p>I am curious about whether any version of Unix has ever had an "flink" system call, analogous to link(2), except that where  link has the following interface:</p>
  
  <pre><code>  int link(const char *oldpath, const char *newpath);
  </code></pre>
  
  <p>this hypothetical flink would have:</p>
  
  <pre><code> int flink(int fd, const char *newpath);
  </code></pre>
  
  <p>It would behave exactly the same, except that istead of using <code>iname</code> internally to resolve <code>oldpath</code> to an inode, it would just use the inode pointed to by the <code>fd</code> structure.</p>
  
  <p>If this hasn't ever been done, is there something obviously wrong with the idea?</p>