mirror of
https://github.com/ceph/ceph
synced 2024-12-18 09:25:49 +00:00
client: Fix ref counting double free with hardlink
Peforming a hard link through the libcephfs interface causes a double free on shutdown, due to the Client::link call decrementing the parent (of the target) directory's inode. This fix removes the put_inode(dir) call, to match the behavior of Client::ll_link. Signed-off-by: Sam Lang <sam.lang@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
49ca7d50f9
commit
1638f62668
@ -3777,7 +3777,6 @@ int Client::link(const char *relexisting, const char *relpath)
|
||||
if (r < 0)
|
||||
goto out_unlock;
|
||||
r = _link(in, dir, name.c_str());
|
||||
put_inode(dir);
|
||||
out_unlock:
|
||||
put_inode(in);
|
||||
out:
|
||||
|
Loading…
Reference in New Issue
Block a user