summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
diff options
context:
space:
mode:
authorLuben Tuikov <luben.tuikov@amd.com>2021-04-13 08:31:59 -0400
committerAlex Deucher <alexander.deucher@amd.com>2021-04-15 16:32:44 -0400
commit80b0cd0fb97ec3c02b0f2c4dc26fe3e8be94dc01 (patch)
tree6eef3ca5488d4cfa1245c1584b0398884d9812b8 /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
parent6cb7a1d40acb2425b9dabb99cdaf522bf47295cb (diff)
drm/amdgpu: Fix a bug in checking the result of reserve page
Fix if (ret) --> if (!ret), a bug, for "retire_page", which caused the kernel to recall the method with *pos == end of file, and that bounced back with error. On the first run, we advanced *pos, but returned 0 back to fs layer, also a bug. Fix the logic of the check of the result of amdgpu_reserve_page_direct()--it is 0 on success, and non-zero on error, not the other way around. This patch fixes this bug. Cc: Alexander Deucher <Alexander.Deucher@amd.com> Cc: John Clements <john.clements@amd.com> Cc: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c')
0 files changed, 0 insertions, 0 deletions