ovl: Replace offsetof() with struct_size() in ovl_cache_entry_new()
authorThorsten Blum <thorsten.blum@linux.dev>
Sat, 3 May 2025 11:52:03 +0000 (13:52 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 5 May 2025 10:47:30 +0000 (12:47 +0200)
commit5aaf6a8cc3305e1000417f6fac9d131c47db9117
tree8f1ed93456aa1cd2854b06d858b3441d70acf832
parent8a39f1c870e9d6fbac5638f3a42a6a6363829c49
ovl: Replace offsetof() with struct_size() in ovl_cache_entry_new()

Compared to offsetof(), struct_size() provides additional compile-time
checks for structs with flexible arrays (e.g., __must_be_array()).

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/readdir.c