diff options
| author | Mike Snitzer <[email protected]> | 2016-04-12 16:14:46 +0000 |
|---|---|---|
| committer | Mike Snitzer <[email protected]> | 2016-04-14 21:34:49 +0000 |
| commit | 9567366fefddeaea4ed1d713270535d93a3b3c76 (patch) | |
| tree | 92829c59c613f72cedc01fb14685915bce060468 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | dm: fix dm_target_io leak if clone_bio() returns an error (diff) | |
| download | kernel-9567366fefddeaea4ed1d713270535d93a3b3c76.tar.gz kernel-9567366fefddeaea4ed1d713270535d93a3b3c76.zip | |
dm cache metadata: fix READ_LOCK macros and cleanup WRITE_LOCK macros
The READ_LOCK macro was incorrectly returning -EINVAL if
dm_bm_is_read_only() was true -- it will always be true once the cache
metadata transitions to read-only by dm_cache_metadata_set_read_only().
Wrap READ_LOCK and WRITE_LOCK multi-statement macros in do {} while(0).
Also, all accesses of the 'cmd' argument passed to these related macros
are now encapsulated in parenthesis.
A follow-up patch can be developed to eliminate the use of macros in
favor of pure C code. Avoiding that now given that this needs to apply
to stable@.
Reported-by: Ben Hutchings <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Fixes: d14fcf3dd79 ("dm cache: make sure every metadata function checks fail_io")
Cc: [email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions
