- Fix for memory allocation for scst_user and locally handled commands
[mirror/scst/.git] / scst / src / dev_handlers / scst_user.c
index 62f0d77..8b77139 100644 (file)
@@ -671,7 +671,7 @@ static int dev_user_alloc_space(struct scst_user_cmd *ucmd)
                goto out;
        }
 
-       if ((cmd->data_direction != SCST_DATA_WRITE) &&
+       if (!(cmd->data_direction & SCST_DATA_WRITE) &&
            !scst_is_cmd_local(cmd)) {
                TRACE_DBG("Delayed alloc, ucmd %p", ucmd);
                goto out;