libata: make ata_print_id atomic
authorDan Williams <dan.j.williams@intel.com>
Sun, 11 Mar 2012 07:28:46 +0000 (23:28 -0800)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 12 Apr 2012 19:57:51 +0000 (15:57 -0400)
commit85d6725b7c0d7e3fa4261fdd4c020be4224fc9f1
tree359e39a0982124c9f630ff3928aaf6f75d8b7dd3
parent99b80e97710ae2e53c951acfdd956e9f38e36646
libata: make ata_print_id atomic

This variable is incremented from multiple contexts (module_init via
libata-lldds and the libsas discovery thread).  Make it atomic to head
off any chance of libsas and libata creating duplicate ids.

Acked-by: Jacek Danecki <jacek.danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c
drivers/ata/libata-scsi.c
drivers/ata/libata.h