[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100627093823.GC12016@lst.de>
Date: Sun, 27 Jun 2010 11:38:23 +0200
From: Christoph Hellwig <hch@....de>
To: Mike Snitzer <snitzer@...hat.com>
Cc: Christoph Hellwig <hch@....de>, axboe@...nel.dk,
dm-devel@...hat.com, James.Bottomley@...e.de,
linux-kernel@...r.kernel.org, martin.petersen@...cle.com,
akpm@...ux-foundation.org
Subject: Re: [PATCH 1/2] block: fix leaks associated with discard request payload
On Sat, Jun 26, 2010 at 03:56:50PM -0400, Mike Snitzer wrote:
> Fix leaks introduced via "block: don't allocate a payload for discard
> request" commit a1d949f5f44.
>
> sd_done() is not called for REQ_TYPE_BLOCK_PC commands so cleanup
> discard request's payload directly in scsi_finish_command().
>
> Also cleanup page allocated for discard payload in
> scsi_setup_discard_cmnd's scsi_setup_blk_pc_cmnd error path.
This looks good - I've tested an equivalent patch doing xfstests runs
for more than 24hours now without seeing leaks.
On the long run I'd prefer not having the knowledge of the payload
freeing inside the core scsi code, but that requires either calling
->done for block pc requests, or treating discards as fs requests all
the way, which will require much larger changes.
So for now:
Reviewed-by: Christoph Hellwig <hch@....de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists