From: Yan, Zheng Date: Tue, 23 Dec 2014 07:30:54 +0000 (+0800) Subject: ceph: improve reference tracking for snaprealm X-Git-Tag: fixes-v4.0-rc1~51^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=982d6011bc30a26e8a3d546e0e7fc7db2c255d85;p=pandora-kernel.git ceph: improve reference tracking for snaprealm When snaprealm is created, its initial reference count is zero. But in some rare cases, the newly created snaprealm is not referenced by anyone. This causes snaprealm with zero reference count not freed. The fix is set reference count of newly snaprealm to 1. The reference is return the function who requests to create the snaprealm. When the function finishes its job, it releases the reference. Signed-off-by: Yan, Zheng --- Reading git-diff-tree failed