mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 09:00:54 +07:00
for-linus-20180524
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCAAGBQJbBramAAoJEPfTWPspceCm2gsP/R5p/Vo8Ml303cdgCOrw+Q+T W/Wp6hGmNUZ7HjMlfF85rF1bqpgGoj226qIibHvKi7eYwUScDNgJwcrrWnNazbGx Rnl/+NQ/H/38pBvvDJKjth9n0LY/O1geemhnWzYZmqmZJe3jFNTDpw5pGy4RkTpJ 4DCuXg2n81x+kDt7Nslb0dYONkrc1yUjelHS/sJKlUoPs1MvsICGsWNS+Lw0WMIj Ls282QNs1Z6Y1gcM18UXsTNJSXQFTBmsbH3CIBukHckP2wjZrMEvgM+uxIORqwID 0DJWBSVNJMxrsyZtkMMkkz2wMjPjSvx3HjD/ULpglJD6nGSwRAiQr6XIxARSEEDL 3prQyhEeVGSioOjt5IR2Llt9QDYVhb1GJqqHYmDZux0SMCVg1Pv7mclrudpXGpzq v2mSJqnwLofOuTFrSh6afgxClD/yh1UNKByf4Ni78PagAgNS4SjEIz8VDG4m1iNu UgWMbM+vqpZhgIlSDsmnqFEVyGwCWwUOHGCeshQXIy9xaWbCtmaGQpNh4Tho273O wH6F/jwCnw1BcUeiwOQi+qcwEf1z6nRTGGb3hZt7u2Tj6r8HZzNHtkRaFXsIrnvA Vc3Y9+YzRWBVV6wzqPC5K+alvGs5ZXLj7BIxQorEkoMkNCYWiPsiBS/rtc0OYiST b2rC+5eYzquEZ42aqIIn =QBaF -----END PGP SIGNATURE----- Merge tag 'for-linus-20180524' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Two fixes that should go into this release: - a loop writeback error clearing fix from Jeff - the sr sense fix from myself" * tag 'for-linus-20180524' of git://git.kernel.dk/linux-block: loop: clear wb_err in bd_inode when detaching backing file sr: pass down correctly sized SCSI sense buffer
This commit is contained in:
commit
b68ea0ee03
@ -1068,6 +1068,7 @@ static int loop_clr_fd(struct loop_device *lo)
|
||||
if (bdev) {
|
||||
bdput(bdev);
|
||||
invalidate_bdev(bdev);
|
||||
bdev->bd_inode->i_mapping->wb_err = 0;
|
||||
}
|
||||
set_capacity(lo->lo_disk, 0);
|
||||
loop_sysfs_exit(lo);
|
||||
|
@ -188,9 +188,13 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)
|
||||
struct scsi_device *SDev;
|
||||
struct scsi_sense_hdr sshdr;
|
||||
int result, err = 0, retries = 0;
|
||||
unsigned char sense_buffer[SCSI_SENSE_BUFFERSIZE], *senseptr = NULL;
|
||||
|
||||
SDev = cd->device;
|
||||
|
||||
if (cgc->sense)
|
||||
senseptr = sense_buffer;
|
||||
|
||||
retry:
|
||||
if (!scsi_block_when_processing_errors(SDev)) {
|
||||
err = -ENODEV;
|
||||
@ -198,10 +202,12 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)
|
||||
}
|
||||
|
||||
result = scsi_execute(SDev, cgc->cmd, cgc->data_direction,
|
||||
cgc->buffer, cgc->buflen,
|
||||
(unsigned char *)cgc->sense, &sshdr,
|
||||
cgc->buffer, cgc->buflen, senseptr, &sshdr,
|
||||
cgc->timeout, IOCTL_RETRIES, 0, 0, NULL);
|
||||
|
||||
if (cgc->sense)
|
||||
memcpy(cgc->sense, sense_buffer, sizeof(*cgc->sense));
|
||||
|
||||
/* Minimal error checking. Ignore cases we know about, and report the rest. */
|
||||
if (driver_byte(result) != 0) {
|
||||
switch (sshdr.sense_key) {
|
||||
|
Loading…
Reference in New Issue
Block a user