lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1288080394.1695.3.camel@leonhard>
Date:	Tue, 26 Oct 2010 17:06:34 +0900
From:	Namhyung Kim <namhyung@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Alexander Viro <viro@...iv.linux.org.uk>,
	Christoph Hellwig <hch@....de>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH UPDATED] fs/buffer.c: call __block_write_begin() if we
 have page

2010-10-25 (월), 16:11 -0700, Andrew Morton:
> On Sun, 24 Oct 2010 01:11:54 +0900
> Namhyung Kim <namhyung@...il.com> wrote:
> 
> > If we have the appropriate page already, call __block_write_begin()
> > directly instead of releasing and regrabbing it inside of
> > block_write_begin().
> > 
> > Signed-off-by: Namhyung Kim <namhyung@...il.com>
> > ---
> > Fix error path.
> > 
> >  fs/buffer.c |   12 +++++++-----
> >  1 files changed, 7 insertions(+), 5 deletions(-)
> > 
> > diff --git a/fs/buffer.c b/fs/buffer.c
> > index 7f0b9b0..f5755f7 100644
> > --- a/fs/buffer.c
> > +++ b/fs/buffer.c
> > @@ -2466,11 +2466,13 @@ int nobh_write_begin(struct address_space *mapping,
> >  	*fsdata = NULL;
> >  
> >  	if (page_has_buffers(page)) {
> > -		unlock_page(page);
> > -		page_cache_release(page);
> > -		*pagep = NULL;
> > -		return block_write_begin(mapping, pos, len, flags, pagep,
> > -					 get_block);
> > +		ret = __block_write_begin(page, pos, len, get_block);
> > +		if (unlikely(ret)) {
> > +			unlock_page(page);
> > +			page_cache_release(page);
> > +			*pagep = NULL;
> > +		}
> > +		return ret;
> >  	}
> >  
> >  	if (PageMappedToDisk(page))
> 
> It looks OK.  Was it tested?  (ext2 mounted with -o nobh)

I just did tar && untar with current kernel source several times on UML.
It worked find for me. Thanks.


-- 
Regards,
Namhyung Kim


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ