I don't understand why you think the concept is wrong. Right now all users
clearly do want to free the tag on re-issue, and doing so clearly cleans
up the code and avoids duplication.
So I still don't see the advantage of your patch, even once you've fixed
the locking issue.
HOWEVER, if you really think that some future users might not want to have
the tag played with, how about making the "at_head" thing a flags field,
and letting people say so by having "INSERT_NOTAG" (and making the
existing bit be INSERT_ATHEAD).
So then the SCSI users would look like
blk_insert_request(q, SRpnt->sr_request,
at_head ? INSERT_ATHEAD : 0,
SRpnt)
while your future non-tag user might do
blk_insert_request(q, newreq,
INSERT_ATHEAD | INSERT_NOTAG,
channel);
_without_ having that unnecessary code duplication.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/