]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/gfs2/ops_fstype.c
Merge tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2...
[mirror_ubuntu-artful-kernel.git] / fs / gfs2 / ops_fstype.c
index 001c6664124302189a0a6a10eddfd3fc4102ff05..dbed9e243ea2ff4dff89ae7212d282512656781e 100644 (file)
@@ -352,6 +352,9 @@ static int gfs2_read_sb(struct gfs2_sbd *sdp, int silent)
        sdp->sd_jheightsize[x] = ~0;
        gfs2_assert(sdp, sdp->sd_max_jheight <= GFS2_MAX_META_HEIGHT);
 
+       sdp->sd_max_dents_per_leaf = (sdp->sd_sb.sb_bsize -
+                                     sizeof(struct gfs2_leaf)) /
+                                    GFS2_MIN_DIRENT_SIZE;
        return 0;
 }
 
@@ -910,8 +913,7 @@ fail_qc_i:
 fail_ut_i:
        iput(sdp->sd_sc_inode);
 fail:
-       if (pn)
-               iput(pn);
+       iput(pn);
        return error;
 }