mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
Staging: DST: Do not allow empty barriers.
Do not allow empty barriers or generic_make_request() -> scsi_setup_fs_cmnd() will explode Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
e55b689268
commit
30c7c1c630
@ -100,10 +100,33 @@ static void dst_node_set_size(struct dst_node *n)
|
||||
static int dst_request(struct request_queue *q, struct bio *bio)
|
||||
{
|
||||
struct dst_node *n = q->queuedata;
|
||||
int err = -EIO;
|
||||
|
||||
if (bio_empty_barrier(bio) && !q->prepare_discard_fn) {
|
||||
/*
|
||||
* This is a dirty^Wnice hack, but if we complete this
|
||||
* operation with -EOPNOTSUPP like intended, XFS
|
||||
* will stuck and freeze the machine. This may be
|
||||
* not particulary XFS problem though, but it is the
|
||||
* only FS which sends empty barrier at umount time
|
||||
* I worked with.
|
||||
*
|
||||
* Empty barriers are not allowed anyway, see 51fd77bd9f512
|
||||
* for example, although later it was changed to bio_discard()
|
||||
* only, which does not work in this case.
|
||||
*/
|
||||
//err = -EOPNOTSUPP;
|
||||
err = 0;
|
||||
goto end_io;
|
||||
}
|
||||
|
||||
bio_get(bio);
|
||||
|
||||
return dst_process_bio(n, bio);
|
||||
|
||||
end_io:
|
||||
bio_endio(bio, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user