diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-08-07 12:04:05 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:10 -0400 |
commit | 1e81f89b020758fb424f8bb0f13405706d29dfc7 (patch) | |
tree | 7ae51550659bf2f5e19595ebdb377d1343001382 /fs/bcachefs/util.c | |
parent | 6fe893eade864665c0956a2ac2eff78b86dc8145 (diff) | |
download | linux-stable-1e81f89b020758fb424f8bb0f13405706d29dfc7.tar.gz linux-stable-1e81f89b020758fb424f8bb0f13405706d29dfc7.tar.bz2 linux-stable-1e81f89b020758fb424f8bb0f13405706d29dfc7.zip |
bcachefs: Fix assorted checkpatch nits
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/util.c')
-rw-r--r-- | fs/bcachefs/util.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c index 6374d8aa9afc..e4f21fcae944 100644 --- a/fs/bcachefs/util.c +++ b/fs/bcachefs/util.c @@ -216,6 +216,7 @@ u64 bch2_read_flag_list(char *opt, const char * const list[]) while ((p = strsep(&s, ","))) { int flag = match_string(list, -1, p); + if (flag < 0) { ret = -1; break; @@ -797,9 +798,10 @@ void memcpy_to_bio(struct bio *dst, struct bvec_iter dst_iter, const void *src) struct bvec_iter iter; __bio_for_each_segment(bv, dst, iter, dst_iter) { - void *dstp = kmap_atomic(bv.bv_page); + void *dstp = kmap_local_page(bv.bv_page); + memcpy(dstp + bv.bv_offset, src, bv.bv_len); - kunmap_atomic(dstp); + kunmap_local(dstp); src += bv.bv_len; } @@ -811,9 +813,10 @@ void memcpy_from_bio(void *dst, struct bio *src, struct bvec_iter src_iter) struct bvec_iter iter; __bio_for_each_segment(bv, src, iter, src_iter) { - void *srcp = kmap_atomic(bv.bv_page); + void *srcp = kmap_local_page(bv.bv_page); + memcpy(dst, srcp + bv.bv_offset, bv.bv_len); - kunmap_atomic(srcp); + kunmap_local(srcp); dst += bv.bv_len; } |