diff options
author | Filipe David Borba Manana <fdmanana@gmail.com> | 2013-08-20 18:51:48 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 14:16:20 +0200 |
commit | bdab49d760c14dd7d5a8f64dbfedd7a3f1121e9b (patch) | |
tree | 7003c5a7412078d07f7617a414986916b3c3a45c /fs/btrfs/delayed-inode.c | |
parent | Btrfs: Use %z to format size_t (diff) | |
download | linux-bdab49d760c14dd7d5a8f64dbfedd7a3f1121e9b.tar.xz linux-bdab49d760c14dd7d5a8f64dbfedd7a3f1121e9b.zip |
Btrfs: fix printing of non NULL terminated string
The name buffer is not terminated by a '\0' character,
therefore it needs to be printed with %.*s and use the
length of the buffer.
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/delayed-inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 33dd4a5349fb..cbd9523ad09c 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1471,10 +1471,10 @@ int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans, mutex_lock(&delayed_node->mutex); ret = __btrfs_add_delayed_insertion_item(delayed_node, delayed_item); if (unlikely(ret)) { - printk(KERN_ERR "err add delayed dir index item(name: %s) into " - "the insertion tree of the delayed node" + printk(KERN_ERR "err add delayed dir index item(name: %.*s) " + "into the insertion tree of the delayed node" "(root id: %llu, inode id: %llu, errno: %d)\n", - name, delayed_node->root->objectid, + name_len, name, delayed_node->root->objectid, delayed_node->inode_id, ret); BUG(); } |