Merge tag 'xfs-for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc...
[cascardo/linux.git] / fs / xfs / xfs_buf.c
index 01bd678..8ecffb3 100644 (file)
@@ -438,7 +438,6 @@ _xfs_buf_find(
        xfs_buf_flags_t         flags,
        xfs_buf_t               *new_bp)
 {
-       size_t                  numbytes;
        struct xfs_perag        *pag;
        struct rb_node          **rbp;
        struct rb_node          *parent;
@@ -450,10 +449,9 @@ _xfs_buf_find(
 
        for (i = 0; i < nmaps; i++)
                numblks += map[i].bm_len;
-       numbytes = BBTOB(numblks);
 
        /* Check for IOs smaller than the sector size / not sector aligned */
-       ASSERT(!(numbytes < btp->bt_meta_sectorsize));
+       ASSERT(!(BBTOB(numblks) < btp->bt_meta_sectorsize));
        ASSERT(!(BBTOB(blkno) & (xfs_off_t)btp->bt_meta_sectormask));
 
        /*
@@ -1532,9 +1530,10 @@ xfs_wait_buftarg(
                        list_del_init(&bp->b_lru);
                        if (bp->b_flags & XBF_WRITE_FAIL) {
                                xfs_alert(btp->bt_mount,
-"Corruption Alert: Buffer at block 0x%llx had permanent write failures!\n"
-"Please run xfs_repair to determine the extent of the problem.",
+"Corruption Alert: Buffer at block 0x%llx had permanent write failures!",
                                        (long long)bp->b_bn);
+                               xfs_alert(btp->bt_mount,
+"Please run xfs_repair to determine the extent of the problem.");
                        }
                        xfs_buf_rele(bp);
                }