summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-04-12 14:24:28 -0700
committerSage Weil <sage@newdream.net>2010-04-12 14:25:51 -0700
commitf5b066287c74b624583b993395a65d03a6487b3a (patch)
tree113dd2a4bbf0d2ff9fd374b53dc377f55677f922 /fs
parent2844a76a25a2fc2f5025cf128c95a14d86146d33 (diff)
downloadlinux-f5b066287c74b624583b993395a65d03a6487b3a.tar.bz2
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index aed8fda33024..7505b4f1f597 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -170,11 +170,11 @@ more:
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++;