diff options
Diffstat (limited to 'api/src/glfs-fops.c')
-rw-r--r-- | api/src/glfs-fops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c index 605913ae51..8ee9a20772 100644 --- a/api/src/glfs-fops.c +++ b/api/src/glfs-fops.c @@ -1617,6 +1617,15 @@ retrynew: goto out; } + /* Filling the inode of the hard link to be same as that of the + original file + */ + if (newloc.inode) { + inode_unref (newloc.inode); + newloc.inode = NULL; + } + newloc.inode = inode_ref (oldloc.inode); + ret = syncop_link (subvol, &oldloc, &newloc); if (ret == -1 && errno == ESTALE) { |