summaryrefslogtreecommitdiff
path: root/libbcachefs/debug.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-04-12 11:48:36 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2021-04-12 11:48:45 -0400
commitb422ff58ba8eedcfef3b67b66468660f07b0cfc1 (patch)
treeb9a02fbf56200076c7692b3ab7863bba5c98985d /libbcachefs/debug.c
parent816ec6051675444d28a2b52ca3aac2558e9178c4 (diff)
Update bcachefs sources to a8b3ce7599 fixup! bcachefs: Eliminate more PAGE_SIZE uses
Diffstat (limited to 'libbcachefs/debug.c')
-rw-r--r--libbcachefs/debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbcachefs/debug.c b/libbcachefs/debug.c
index acf60038..90364b55 100644
--- a/libbcachefs/debug.c
+++ b/libbcachefs/debug.c
@@ -150,7 +150,7 @@ struct dump_iter {
struct bch_fs *c;
enum btree_id id;
- char buf[PAGE_SIZE];
+ char buf[1 << 12];
size_t bytes; /* what's currently in buf */
char __user *ubuf; /* destination user buffer */
@@ -230,7 +230,7 @@ static ssize_t bch2_read_btree(struct file *file, char __user *buf,
while (k.k && !(err = bkey_err(k))) {
bch2_bkey_val_to_text(&PBUF(i->buf), i->c, k);
i->bytes = strlen(i->buf);
- BUG_ON(i->bytes >= PAGE_SIZE);
+ BUG_ON(i->bytes >= sizeof(i->buf));
i->buf[i->bytes] = '\n';
i->bytes++;