summaryrefslogtreecommitdiff
path: root/mm/readahead.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2023-07-09 19:12:55 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-08-18 20:18:51 +0300
commitb46fae06153da31a80ab0f3e98819416fc134725 (patch)
tree3c991aa36c8b628558ebc39cb64f53b4aadd2c8b /mm/readahead.c
parent4264be505d9f3657de9626f551099e595b2ae7fe (diff)
downloadlinux-b46fae06153da31a80ab0f3e98819416fc134725.tar.xz
ipc/sem: use flexible array in 'struct sem_undo'
Turn 'semadj' in 'struct sem_undo' into a flexible array. The advantages are: - save the size of a pointer when the new undo structure is allocated - avoid some always ugly pointer arithmetic to get the address of semadj - avoid an indirection when the array is accessed While at it, use struct_size() to compute the size of the new undo structure. Link: https://lkml.kernel.org/r/1ba993d443ad7e16ac2b1902adab1f05ebdfa454.1688918791.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Manfred Spraul <manfred@colorfullife.com> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Jann Horn <jannh@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/readahead.c')
0 files changed, 0 insertions, 0 deletions