diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2022-04-18 22:46:38 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-04-18 22:46:38 -0400 |
commit | 08c84a75ddf340acf14bb04021045fe5bbdccc93 (patch) | |
tree | 45645ad9c5e962c9a015964f01360ebe16ee8ae9 /drivers/target | |
parent | 25a0bf213b8a563c5244326ae992456e8c9bb373 (diff) | |
parent | 70a3baeec4e89736be932a60d682d7ae27556f5c (diff) | |
download | lwn-08c84a75ddf340acf14bb04021045fe5bbdccc93.tar.gz lwn-08c84a75ddf340acf14bb04021045fe5bbdccc93.zip |
Merge branch '5.18/scsi-fixes' into 5.19/scsi-staging
Pull in 5.18 fixes branch which contains a bunch of fixes required for
the lpfc driver update.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_user.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 95d4ca50a605..fd7267baa707 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c @@ -1821,6 +1821,7 @@ static struct page *tcmu_try_get_data_page(struct tcmu_dev *udev, uint32_t dpi) mutex_lock(&udev->cmdr_lock); page = xa_load(&udev->data_pages, dpi); if (likely(page)) { + get_page(page); mutex_unlock(&udev->cmdr_lock); return page; } @@ -1877,6 +1878,7 @@ static vm_fault_t tcmu_vma_fault(struct vm_fault *vmf) /* For the vmalloc()ed cmd area pages */ addr = (void *)(unsigned long)info->mem[mi].addr + offset; page = vmalloc_to_page(addr); + get_page(page); } else { uint32_t dpi; @@ -1887,7 +1889,6 @@ static vm_fault_t tcmu_vma_fault(struct vm_fault *vmf) return VM_FAULT_SIGBUS; } - get_page(page); vmf->page = page; return 0; } |