]> git.baikalelectronics.ru Git - kernel.git/commit
xen-blkback: workaround compiler bug in gcc 4.1
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 21 Jun 2013 10:56:53 +0000 (12:56 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 21 Jun 2013 19:58:44 +0000 (15:58 -0400)
commit08be9c780d06b7a73ec3e33262f61f629fbb4709
tree7794f24be80ffaad203616bf71162bc6b54c133f
parent57f36dfa0a6104e216c8f7e06ef91f79bb326c2f
xen-blkback: workaround compiler bug in gcc 4.1

The code generat with gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)
creates an unbound loop for the second foreach_grant_safe loop in
purge_persistent_gnt.

The workaround is to avoid having this second loop and instead
perform all the work inside the first loop by adding a new variable,
clean_used, that will be set when all the desired persistent grants
have been removed and we need to iterate over the remaining ones to
remove the WAS_ACTIVE flag.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reported-by: Tom O'Neill <toneill@vmem.com>
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkback/blkback.c