diff options
author | Sage Weil <sage@newdream.net> | 2010-04-12 23:24:28 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-04-12 23:25:51 +0200 |
commit | f5b066287c74b624583b993395a65d03a6487b3a (patch) | |
tree | 113dd2a4bbf0d2ff9fd374b53dc377f55677f922 /fs | |
parent | ceph: decode v5 of osdmap (pool names) [protocol change] (diff) | |
download | linux-f5b066287c74b624583b993395a65d03a6487b3a.tar.xz linux-f5b066287c74b624583b993395a65d03a6487b3a.zip |
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.c | 4 |
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++; |