summaryrefslogtreecommitdiff
path: root/fs/bcachefs/debug.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-04-06 14:00:56 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-04-17 15:42:53 -0400
commit2fd076d1798eff1cb6e5c2a84443f264781ada83 (patch)
treef5f053cfbab1c69f43a5d00df296c1c952e720af /fs/bcachefs/debug.c
parentfb7d003b839eba4c87cc315a599758643fe48c0b (diff)
bcachefs: Eliminate more PAGE_SIZE uses
In userspace, we don't really have a well defined PAGE_SIZE and shouln't be relying on it. This is some more incremental work to remove references to it. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/debug.c')
-rw-r--r--fs/bcachefs/debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c
index acf600387c9f..90364b55aa40 100644
--- a/fs/bcachefs/debug.c
+++ b/fs/bcachefs/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++;