[ 11/24] ceph: fix dentry reference leak in encode_fh()

From: Greg Kroah-Hartman
Date: Fri Nov 02 2012 - 13:11:06 EST


3.6-stable review patch. If anyone has any objections, please let me know.

------------------

From: David Zafman <david.zafman@xxxxxxxxxxx>

commit 52eb5a900a9863a8b77a895f770e5d825c8e02c6 upstream.

Call to d_find_alias() needs a corresponding dput()

This fixes http://tracker.newdream.net/issues/3271

Signed-off-by: David Zafman <david.zafman@xxxxxxxxxxx>
Reviewed-by: Sage Weil <sage@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
fs/ceph/export.c | 2 ++
1 file changed, 2 insertions(+)

--- a/fs/ceph/export.c
+++ b/fs/ceph/export.c
@@ -90,6 +90,8 @@ static int ceph_encode_fh(struct inode *
*max_len = handle_length;
type = 255;
}
+ if (dentry)
+ dput(dentry);
return type;
}



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/