mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 11:11:27 +00:00
Let's do it in a more safe way
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2021 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2569,7 +2569,7 @@ static void blockio_endio(struct bio *bio, int error)
|
||||
/* To protect from several bios finishing simultaneously */
|
||||
spin_lock_bh(&blockio_endio_lock);
|
||||
|
||||
if (bio->bi_rw & WRITE)
|
||||
if (bio->bi_rw & (1 << BIO_RW))
|
||||
scst_set_cmd_error(blockio_work->cmd,
|
||||
SCST_LOAD_SENSE(scst_sense_write_error));
|
||||
else
|
||||
@@ -2708,7 +2708,7 @@ static void blockio_exec_rw(struct scst_cmd *cmd, struct scst_vdisk_thr *thr,
|
||||
bio = hbio;
|
||||
hbio = hbio->bi_next;
|
||||
bio->bi_next = NULL;
|
||||
submit_bio(write, bio);
|
||||
submit_bio((write != 0), bio);
|
||||
}
|
||||
|
||||
if (q && q->unplug_fn)
|
||||
|
||||
Reference in New Issue
Block a user