From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH] exofs: clean up the correct page collection on write error Date: Sun, 2 Dec 2012 14:58:30 +0200 Message-ID: <50BB5076.3000703@panasas.com> References: <1353941346-20598-1-git-send-email-idank@tonian.com> <50B8BE60.6090009@panasas.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: , , , , To: Idan Kedar Return-path: Received: from natasha.panasas.com ([67.152.220.90]:49182 "EHLO natasha.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750838Ab2LBM6l (ORCPT ); Sun, 2 Dec 2012 07:58:41 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 12/02/2012 11:57 AM, Idan Kedar wrote: > On Fri, Nov 30, 2012 at 4:10 PM, Boaz Harrosh wrote: <> >> err: >> - _unlock_pcol_pages(pcol, ret, WRITE); >> - pcol_free(pcol); >> + if (!pcol_copy) /* Failed before ownership transfer */ >> + pcol_copy = pcol; >> + _unlock_pcol_pages(pcol_copy, ret, WRITE); >> + pcol_free(pcol_copy); >> kfree(pcol_copy); >> >> return ret; >> -- >> 1.7.10.2.677.gb6bc67f >> > > I started with that implementation, but it seemed less readable to me. > I don't mind the readability, it is not that bad. But I do mind the extra local variable I'd rather not have it. (I hate it when two places have the same info, they get out of sync fast, I'd rather do with one) > On Fri, Nov 30, 2012 at 4:15 PM, Boaz Harrosh wrote: >> On 11/30/2012 04:10 PM, Boaz Harrosh wrote: >> >> I forgot to ask do you need this for stable? >> >> Boaz > > nope. > Thanks Boaz