mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
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: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
2844a76a25
commit
f5b066287c
1 changed files with 2 additions and 2 deletions
|
@ -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++;
|
||||
|
||||
|
|
Loading…
Reference in a new issue