summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/bcache_ondisk.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bcache/bcache_ondisk.h')
-rw-r--r--drivers/md/bcache/bcache_ondisk.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/bcache/bcache_ondisk.h b/drivers/md/bcache/bcache_ondisk.h
index 97413586195b..f96034e0ba4f 100644
--- a/drivers/md/bcache/bcache_ondisk.h
+++ b/drivers/md/bcache/bcache_ondisk.h
@@ -106,7 +106,8 @@ static inline unsigned long bkey_bytes(const struct bkey *k)
return bkey_u64s(k) * sizeof(__u64);
}
-#define bkey_copy(_dest, _src) memcpy(_dest, _src, bkey_bytes(_src))
+#define bkey_copy(_dest, _src) unsafe_memcpy(_dest, _src, bkey_bytes(_src), \
+ /* bkey is always padded */)
static inline void bkey_copy_key(struct bkey *dest, const struct bkey *src)
{