mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-15 09:03:59 +08:00
fs: dlm: use READ_ONCE for config var
This patch will use READ_ONCE to signal the compiler to read this variable only one time. If we don't do that it could be that the compiler read this value more than one time, because some optimizations, from the configure data which might can be changed during this time. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
parent
feb704bd17
commit
d921a23f3e
@ -498,7 +498,7 @@ static int new_lockspace(const char *name, const char *cluster,
|
||||
ls->ls_exflags = (flags & ~(DLM_LSFL_TIMEWARN | DLM_LSFL_FS |
|
||||
DLM_LSFL_NEWEXCL));
|
||||
|
||||
size = dlm_config.ci_rsbtbl_size;
|
||||
size = READ_ONCE(dlm_config.ci_rsbtbl_size);
|
||||
ls->ls_rsbtbl_size = size;
|
||||
|
||||
ls->ls_rsbtbl = vmalloc(array_size(size, sizeof(struct dlm_rsbtable)));
|
||||
|
Loading…
Reference in New Issue
Block a user