Skip to content

Commit

Permalink
scsi: libsas: Pass gfp_t flags to event notifiers
Browse files Browse the repository at this point in the history
Use the new libsas event notifiers API, which requires callers to
explicitly pass the gfp_t memory allocation flags.

Context analysis:

  - sas_enable_revalidation(): process, acquires mutex
  - sas_resume_ha(): process, calls wait_event_timeout()

Link: https://lore.kernel.org/r/[email protected]
Cc: Jason Yan <[email protected]>
Reviewed-by: John Garry <[email protected]>
Signed-off-by: Ahmed S. Darwish <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
a-darwish authored and martinkpetersen committed Jan 23, 2021
1 parent 71dca55 commit 19a3983
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion drivers/scsi/libsas/sas_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ void sas_enable_revalidation(struct sas_ha_struct *ha)

sas_phy = container_of(port->phy_list.next, struct asd_sas_phy,
port_phy_el);
sas_notify_port_event(sas_phy, PORTE_BROADCAST_RCVD);
sas_notify_port_event_gfp(sas_phy,
PORTE_BROADCAST_RCVD, GFP_KERNEL);
}
mutex_unlock(&ha->disco_mutex);
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/scsi/libsas/sas_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ void sas_resume_ha(struct sas_ha_struct *ha)

if (phy->suspended) {
dev_warn(&phy->phy->dev, "resume timeout\n");
sas_notify_phy_event(phy, PHYE_RESUME_TIMEOUT);
sas_notify_phy_event_gfp(phy, PHYE_RESUME_TIMEOUT,
GFP_KERNEL);
}
}

Expand Down

0 comments on commit 19a3983

Please sign in to comment.