From: David Zafman Date: Thu, 18 Oct 2012 21:01:43 +0000 (-0700) Subject: ceph: fix dentry reference leak in encode_fh() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=52eb5a900a9863a8b77a895f770e5d825c8e02c6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ceph: fix dentry reference leak in encode_fh() Call to d_find_alias() needs a corresponding dput() This fixes http://tracker.newdream.net/issues/3271 Signed-off-by: David Zafman Reviewed-by: Sage Weil --- diff --git a/fs/ceph/export.c b/fs/ceph/export.c index 8e1b60e557b6..862887004d20 100644 --- a/fs/ceph/export.c +++ b/fs/ceph/export.c @@ -90,6 +90,8 @@ static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len, *max_len = handle_length; type = 255; } + if (dentry) + dput(dentry); return type; }