Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5b06628 authored by Sage Weil's avatar Sage Weil
Browse files

ceph: fix dentry reference leak in dcache readdir



When filldir returned an error (e.g. buffer full for a large directory),
we would leak a dentry reference, causing an oops on umount.

Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 2844a76a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -170,11 +170,11 @@ static int __dcache_readdir(struct file *filp,
	spin_lock(&inode->i_lock);
	spin_lock(&dcache_lock);

	last = dentry;

	if (err < 0)
		goto out_unlock;

	last = dentry;

	p = p->prev;
	filp->f_pos++;