Merge branch 'drm-next-4.8' of git://people.freedesktop.org/~agd5f/linux into drm...
[linux-2.6-block.git] / fs / nilfs2 / dat.c
index 7367610ea8079d38badb619845f2cf5d19bcf95f..dffedb2f88179a321b13ea3901c9fe7efd03ea22 100644 (file)
@@ -349,10 +349,11 @@ int nilfs_dat_move(struct inode *dat, __u64 vblocknr, sector_t blocknr)
        kaddr = kmap_atomic(entry_bh->b_page);
        entry = nilfs_palloc_block_get_entry(dat, vblocknr, entry_bh, kaddr);
        if (unlikely(entry->de_blocknr == cpu_to_le64(0))) {
-               printk(KERN_CRIT "%s: vbn = %llu, [%llu, %llu)\n", __func__,
-                      (unsigned long long)vblocknr,
-                      (unsigned long long)le64_to_cpu(entry->de_start),
-                      (unsigned long long)le64_to_cpu(entry->de_end));
+               nilfs_msg(dat->i_sb, KERN_CRIT,
+                         "%s: invalid vblocknr = %llu, [%llu, %llu)",
+                         __func__, (unsigned long long)vblocknr,
+                         (unsigned long long)le64_to_cpu(entry->de_start),
+                         (unsigned long long)le64_to_cpu(entry->de_end));
                kunmap_atomic(kaddr);
                brelse(entry_bh);
                return -EINVAL;
@@ -479,14 +480,12 @@ int nilfs_dat_read(struct super_block *sb, size_t entry_size,
        int err;
 
        if (entry_size > sb->s_blocksize) {
-               printk(KERN_ERR
-                      "NILFS: too large DAT entry size: %zu bytes.\n",
-                      entry_size);
+               nilfs_msg(sb, KERN_ERR, "too large DAT entry size: %zu bytes",
+                         entry_size);
                return -EINVAL;
        } else if (entry_size < NILFS_MIN_DAT_ENTRY_SIZE) {
-               printk(KERN_ERR
-                      "NILFS: too small DAT entry size: %zu bytes.\n",
-                      entry_size);
+               nilfs_msg(sb, KERN_ERR, "too small DAT entry size: %zu bytes",
+                         entry_size);
                return -EINVAL;
        }