diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-12-13 15:06:45 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-12-17 19:33:52 +0100 |
commit | 293a733df783c242f2e67abb16e8ab180e7d5eed (patch) | |
tree | a7872bbe4eee0588057c4d809645c7a0e06b0682 /include/exec | |
parent | 2a86be257166652b3e4c189c7e2d471e9ab2947f (diff) | |
download | qemu-293a733df783c242f2e67abb16e8ab180e7d5eed.zip qemu-293a733df783c242f2e67abb16e8ab180e7d5eed.tar.gz qemu-293a733df783c242f2e67abb16e8ab180e7d5eed.tar.bz2 |
memory: use RCU_READ_LOCK_GUARD
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec')
-rw-r--r-- | include/exec/memory.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h index 27a84e0..9d3fdb5 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -2171,7 +2171,7 @@ MemTxResult address_space_read(AddressSpace *as, hwaddr addr, if (__builtin_constant_p(len)) { if (len) { - rcu_read_lock(); + RCU_READ_LOCK_GUARD(); fv = address_space_to_flatview(as); l = len; mr = flatview_translate(fv, addr, &addr1, &l, false, attrs); @@ -2182,7 +2182,6 @@ MemTxResult address_space_read(AddressSpace *as, hwaddr addr, result = flatview_read_continue(fv, addr, attrs, buf, len, addr1, l, mr); } - rcu_read_unlock(); } } else { result = address_space_read_full(as, addr, attrs, buf, len); |