From 1638f6266863d6d4eee32c725dc10c94f5871b1e Mon Sep 17 00:00:00 2001 From: Sam Lang Date: Mon, 29 Oct 2012 10:30:01 -0500 Subject: [PATCH] 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 Reviewed-by: Sage Weil --- src/client/Client.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index de9475f9174..424be093557 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -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: