diff options
Diffstat (limited to 'api')
-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 4e1a7ef530a..dd9ea451aae 100644 --- a/api/src/glfs-fops.c +++ b/api/src/glfs-fops.c @@ -1609,6 +1609,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) { |