]> Pileus Git - ~andy/linux/blobdiff - fs/ext4/mmp.c
Merge tag 'for_linux-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
[~andy/linux] / fs / ext4 / mmp.c
index fe7c63f4717e09616b92f7d3b4850ab99671cff6..f9b551561d2cc424fa3b512ba3f0d7c4fc51c41b 100644 (file)
@@ -80,6 +80,8 @@ static int read_mmp_block(struct super_block *sb, struct buffer_head **bh,
         * is not blocked in the elevator. */
        if (!*bh)
                *bh = sb_getblk(sb, mmp_block);
+       if (!*bh)
+               return -ENOMEM;
        if (*bh) {
                get_bh(*bh);
                lock_buffer(*bh);
@@ -91,7 +93,7 @@ static int read_mmp_block(struct super_block *sb, struct buffer_head **bh,
                        *bh = NULL;
                }
        }
-       if (!*bh) {
+       if (unlikely(!*bh)) {
                ext4_warning(sb, "Error while reading MMP block %llu",
                             mmp_block);
                return -EIO;