diff options
author | Sage Weil <sage@newdream.net> | 2010-04-13 01:24:28 +0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-04-13 01:25:51 +0400 |
commit | f5b066287c74b624583b993395a65d03a6487b3a (patch) | |
tree | 113dd2a4bbf0d2ff9fd374b53dc377f55677f922 /fs | |
parent | 2844a76a25a2fc2f5025cf128c95a14d86146d33 (diff) | |
download | linux-f5b066287c74b624583b993395a65d03a6487b3a.tar.xz |
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++; |