diff options
author | Sage Weil <sage@newdream.net> | 2010-04-12 17:24:28 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-04-12 17:25:51 -0400 |
commit | f5b066287c74b624583b993395a65d03a6487b3a (patch) | |
tree | 113dd2a4bbf0d2ff9fd374b53dc377f55677f922 /fs/ceph | |
parent | 2844a76a25a2fc2f5025cf128c95a14d86146d33 (diff) |
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/ceph')
-rw-r--r-- | fs/ceph/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index aed8fda3302..7505b4f1f59 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c | |||
@@ -170,11 +170,11 @@ more: | |||
170 | spin_lock(&inode->i_lock); | 170 | spin_lock(&inode->i_lock); |
171 | spin_lock(&dcache_lock); | 171 | spin_lock(&dcache_lock); |
172 | 172 | ||
173 | last = dentry; | ||
174 | |||
173 | if (err < 0) | 175 | if (err < 0) |
174 | goto out_unlock; | 176 | goto out_unlock; |
175 | 177 | ||
176 | last = dentry; | ||
177 | |||
178 | p = p->prev; | 178 | p = p->prev; |
179 | filp->f_pos++; | 179 | filp->f_pos++; |
180 | 180 | ||