diff options
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r-- | fs/gfs2/super.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index fff5a96f4152..71cca7629403 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -299,8 +299,9 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) | |||
299 | break; | 299 | break; |
300 | 300 | ||
301 | name.len = sprintf(buf, "journal%u", sdp->sd_journals); | 301 | name.len = sprintf(buf, "journal%u", sdp->sd_journals); |
302 | name.hash = gfs2_disk_hash(name.name, name.len); | ||
302 | 303 | ||
303 | error = gfs2_dir_search(sdp->sd_jindex->u.generic_ip, | 304 | error = gfs2_dir_search(sdp->sd_jindex, |
304 | &name, NULL, NULL); | 305 | &name, NULL, NULL); |
305 | if (error == -ENOENT) { | 306 | if (error == -ENOENT) { |
306 | error = 0; | 307 | error = 0; |
@@ -317,8 +318,12 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh) | |||
317 | if (!jd) | 318 | if (!jd) |
318 | break; | 319 | break; |
319 | 320 | ||
320 | error = gfs2_lookupi(sdp->sd_jindex, &name, 1, &jd->jd_inode); | 321 | jd->jd_inode = gfs2_lookupi(sdp->sd_jindex, &name, 1, NULL); |
321 | if (error) { | 322 | if (!jd->jd_inode || IS_ERR(jd->jd_inode)) { |
323 | if (!jd->jd_inode) | ||
324 | error = -ENOENT; | ||
325 | else | ||
326 | error = PTR_ERR(jd->jd_inode); | ||
322 | kfree(jd); | 327 | kfree(jd); |
323 | break; | 328 | break; |
324 | } | 329 | } |