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.karo-electronics.de/?a=commitdiff_plain;h=0f9831a89310cebba52d3f526e6cc5c2e403e6f1;p=linux-beck.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; }