title: Using vfs_link in linux kernel mode
body: <p>I am new to kernel programming. I want to rename a file in linux kernel mode. I did not find any direct functions which can do this. So I found that I can use <code>vfs_link</code> to create new hardlink and <code>vfs_unlink</code> to delete old link. But I did not understand how to use <code>vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry, struct inode **delegated_inode)</code>. </p>
  
  <p>Say I have <code>struct file* fp</code> before using <code>vfs_link</code>.</p>
  
  <p>I understand <code>old_dentry</code> is <code>fp-&gt;f_dentry</code>. But I am not decipher what other params are.
  I did not find any concrete examples on net where <code>vfs_link</code> is used. Please help</p>