From: David Zafman Date: Thu, 18 Oct 2012 21:01:43 +0000 (-0700) Subject: ceph: fix dentry reference leak in encode_fh() X-Git-Tag: firefly_0821_release~3680^2~1324^2~65 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0f9831a89310cebba52d3f526e6cc5c2e403e6f1;p=firefly-linux-kernel-4.4.55.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; }