diff options
Diffstat (limited to 'fs/ubifs/tnc.c')
-rw-r--r-- | fs/ubifs/tnc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index 6793db0754f6..957f5757f374 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c | |||
@@ -98,7 +98,7 @@ static int insert_old_idx(struct ubifs_info *c, int lnum, int offs) | |||
98 | else if (offs > o->offs) | 98 | else if (offs > o->offs) |
99 | p = &(*p)->rb_right; | 99 | p = &(*p)->rb_right; |
100 | else { | 100 | else { |
101 | ubifs_err("old idx added twice!"); | 101 | ubifs_err(c, "old idx added twice!"); |
102 | kfree(old_idx); | 102 | kfree(old_idx); |
103 | return 0; | 103 | return 0; |
104 | } | 104 | } |
@@ -447,7 +447,7 @@ static int try_read_node(const struct ubifs_info *c, void *buf, int type, | |||
447 | 447 | ||
448 | err = ubifs_leb_read(c, lnum, buf, offs, len, 1); | 448 | err = ubifs_leb_read(c, lnum, buf, offs, len, 1); |
449 | if (err) { | 449 | if (err) { |
450 | ubifs_err("cannot read node type %d from LEB %d:%d, error %d", | 450 | ubifs_err(c, "cannot read node type %d from LEB %d:%d, error %d", |
451 | type, lnum, offs, err); | 451 | type, lnum, offs, err); |
452 | return err; | 452 | return err; |
453 | } | 453 | } |
@@ -1684,27 +1684,27 @@ static int validate_data_node(struct ubifs_info *c, void *buf, | |||
1684 | int err, len; | 1684 | int err, len; |
1685 | 1685 | ||
1686 | if (ch->node_type != UBIFS_DATA_NODE) { | 1686 | if (ch->node_type != UBIFS_DATA_NODE) { |
1687 | ubifs_err("bad node type (%d but expected %d)", | 1687 | ubifs_err(c, "bad node type (%d but expected %d)", |
1688 | ch->node_type, UBIFS_DATA_NODE); | 1688 | ch->node_type, UBIFS_DATA_NODE); |
1689 | goto out_err; | 1689 | goto out_err; |
1690 | } | 1690 | } |
1691 | 1691 | ||
1692 | err = ubifs_check_node(c, buf, zbr->lnum, zbr->offs, 0, 0); | 1692 | err = ubifs_check_node(c, buf, zbr->lnum, zbr->offs, 0, 0); |
1693 | if (err) { | 1693 | if (err) { |
1694 | ubifs_err("expected node type %d", UBIFS_DATA_NODE); | 1694 | ubifs_err(c, "expected node type %d", UBIFS_DATA_NODE); |
1695 | goto out; | 1695 | goto out; |
1696 | } | 1696 | } |
1697 | 1697 | ||
1698 | len = le32_to_cpu(ch->len); | 1698 | len = le32_to_cpu(ch->len); |
1699 | if (len != zbr->len) { | 1699 | if (len != zbr->len) { |
1700 | ubifs_err("bad node length %d, expected %d", len, zbr->len); | 1700 | ubifs_err(c, "bad node length %d, expected %d", len, zbr->len); |
1701 | goto out_err; | 1701 | goto out_err; |
1702 | } | 1702 | } |
1703 | 1703 | ||
1704 | /* Make sure the key of the read node is correct */ | 1704 | /* Make sure the key of the read node is correct */ |
1705 | key_read(c, buf + UBIFS_KEY_OFFSET, &key1); | 1705 | key_read(c, buf + UBIFS_KEY_OFFSET, &key1); |
1706 | if (!keys_eq(c, &zbr->key, &key1)) { | 1706 | if (!keys_eq(c, &zbr->key, &key1)) { |
1707 | ubifs_err("bad key in node at LEB %d:%d", | 1707 | ubifs_err(c, "bad key in node at LEB %d:%d", |
1708 | zbr->lnum, zbr->offs); | 1708 | zbr->lnum, zbr->offs); |
1709 | dbg_tnck(&zbr->key, "looked for key "); | 1709 | dbg_tnck(&zbr->key, "looked for key "); |
1710 | dbg_tnck(&key1, "found node's key "); | 1710 | dbg_tnck(&key1, "found node's key "); |
@@ -1716,7 +1716,7 @@ static int validate_data_node(struct ubifs_info *c, void *buf, | |||
1716 | out_err: | 1716 | out_err: |
1717 | err = -EINVAL; | 1717 | err = -EINVAL; |
1718 | out: | 1718 | out: |
1719 | ubifs_err("bad node at LEB %d:%d", zbr->lnum, zbr->offs); | 1719 | ubifs_err(c, "bad node at LEB %d:%d", zbr->lnum, zbr->offs); |
1720 | ubifs_dump_node(c, buf); | 1720 | ubifs_dump_node(c, buf); |
1721 | dump_stack(); | 1721 | dump_stack(); |
1722 | return err; | 1722 | return err; |
@@ -1741,7 +1741,7 @@ int ubifs_tnc_bulk_read(struct ubifs_info *c, struct bu_info *bu) | |||
1741 | len = bu->zbranch[bu->cnt - 1].offs; | 1741 | len = bu->zbranch[bu->cnt - 1].offs; |
1742 | len += bu->zbranch[bu->cnt - 1].len - offs; | 1742 | len += bu->zbranch[bu->cnt - 1].len - offs; |
1743 | if (len > bu->buf_len) { | 1743 | if (len > bu->buf_len) { |
1744 | ubifs_err("buffer too small %d vs %d", bu->buf_len, len); | 1744 | ubifs_err(c, "buffer too small %d vs %d", bu->buf_len, len); |
1745 | return -EINVAL; | 1745 | return -EINVAL; |
1746 | } | 1746 | } |
1747 | 1747 | ||
@@ -1757,7 +1757,7 @@ int ubifs_tnc_bulk_read(struct ubifs_info *c, struct bu_info *bu) | |||
1757 | return -EAGAIN; | 1757 | return -EAGAIN; |
1758 | 1758 | ||
1759 | if (err && err != -EBADMSG) { | 1759 | if (err && err != -EBADMSG) { |
1760 | ubifs_err("failed to read from LEB %d:%d, error %d", | 1760 | ubifs_err(c, "failed to read from LEB %d:%d, error %d", |
1761 | lnum, offs, err); | 1761 | lnum, offs, err); |
1762 | dump_stack(); | 1762 | dump_stack(); |
1763 | dbg_tnck(&bu->key, "key "); | 1763 | dbg_tnck(&bu->key, "key "); |
@@ -3313,7 +3313,7 @@ int dbg_check_inode_size(struct ubifs_info *c, const struct inode *inode, | |||
3313 | 3313 | ||
3314 | out_dump: | 3314 | out_dump: |
3315 | block = key_block(c, key); | 3315 | block = key_block(c, key); |
3316 | ubifs_err("inode %lu has size %lld, but there are data at offset %lld", | 3316 | ubifs_err(c, "inode %lu has size %lld, but there are data at offset %lld", |
3317 | (unsigned long)inode->i_ino, size, | 3317 | (unsigned long)inode->i_ino, size, |
3318 | ((loff_t)block) << UBIFS_BLOCK_SHIFT); | 3318 | ((loff_t)block) << UBIFS_BLOCK_SHIFT); |
3319 | mutex_unlock(&c->tnc_mutex); | 3319 | mutex_unlock(&c->tnc_mutex); |