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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120323155950.f9bfb097.akpm@linux-foundation.org>
Date:	Fri, 23 Mar 2012 15:59:50 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Hugh Dickins <hughd@...gle.com>
Cc:	Christoph Hellwig <hch@...radead.org>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH] mm for fs: add truncate_pagecache_range

On Fri, 23 Mar 2012 14:14:54 -0700 (PDT)
Hugh Dickins <hughd@...gle.com> wrote:

> On Fri, 23 Mar 2012, Andrew Morton wrote:
> > 
> > --- a/mm/truncate.c~mm-for-fs-add-truncate_pagecache_range-fix
> > +++ a/mm/truncate.c
> > @@ -639,6 +639,9 @@ int vmtruncate_range(struct inode *inode
> >   * with on-disk format, and the filesystem would not have to deal with
> >   * situations such as writepage being called for a page that has already
> >   * had its underlying blocks deallocated.
> > + *
> > + * Must be called with inode->i_mapping->i_mutex held.
> 
> You catch me offguard: I forget whether that's an absolute requirement or
> just commonly the case.  What do the other interfaces in truncate.c say ?-)

i_mutex is generally required, to stabilise i_size.

> > + * Takes inode->i_mapping->i_mmap_mutex.
> 
> Yes, and inode->i_mapping->tree_lock.

I don't think it's necessary to get into the spinning locks for a
high-level function which clearly does sleeping things.


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