diff options
author | Sage Weil <sage@newdream.net> | 2010-04-12 14:24:28 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-04-12 14:25:51 -0700 |
commit | f5b066287c74b624583b993395a65d03a6487b3a (patch) | |
tree | 113dd2a4bbf0d2ff9fd374b53dc377f55677f922 /fs/ceph/dir.c | |
parent | 2844a76a25a2fc2f5025cf128c95a14d86146d33 (diff) | |
download | linux-3.10-f5b066287c74b624583b993395a65d03a6487b3a.tar.gz linux-3.10-f5b066287c74b624583b993395a65d03a6487b3a.tar.bz2 linux-3.10-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/ceph/dir.c')
-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: 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++; |