clean up write_begin usage for directories in pagecache
authorChristoph Hellwig <hch@lst.de>
Fri, 4 Jun 2010 09:29:56 +0000 (11:29 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Aug 2010 20:47:31 +0000 (16:47 -0400)
commitf4e420dc423148fba637af1ab618fa8896dfb2d6
treedf0e81f5f4b8448dd6b3929e5537dcc46e7d7dde
parent282dc178849882289d30e58b54be6b2799b351aa
clean up write_begin usage for directories in pagecache

For filesystem that implement directories in pagecache we call
block_write_begin with an already allocated page for this code, while the
normal regular file write path uses the default block_write_begin behaviour.

Get rid of the __foofs_write_begin helper and opencode the normal write_begin
call in foofs_write_begin, while adding a new foofs_prepare_chunk helper for
the directory code.  The added benefit is that foofs_prepare_chunk has
a much saner calling convention.

Note that the interruptible flag passed into block_write_begin is always
ignored if we already pass in a page (see next patch for details), and
we never were doing truncations of exessive blocks for this case either so we
can switch directly to block_write_begin_newtrunc.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
13 files changed:
fs/ext2/dir.c
fs/ext2/ext2.h
fs/ext2/inode.c
fs/minix/dir.c
fs/minix/inode.c
fs/minix/minix.h
fs/nilfs2/dir.c
fs/sysv/dir.c
fs/sysv/itree.c
fs/sysv/sysv.h
fs/ufs/dir.c
fs/ufs/inode.c
fs/ufs/util.h