linux/fs/nilfs2
Ryusuke Konishi 3409453794 nilfs2: fix data loss in mmap page write for hole blocks
From the result of a function test of mmap, mmap write to shared pages
turned out to be broken for hole blocks.  It doesn't write out filled
blocks and the data will be lost after umount.  This is due to a bug
that the target file is not queued for log writer when filling hole
blocks.

Also, nilfs_page_mkwrite function exits normal code path even after
successfully filled hole blocks due to a change of block_page_mkwrite
function; just after nilfs was merged into the mainline,
block_page_mkwrite() started to return VM_FAULT_LOCKED instead of zero
by the patch "mm: close page_mkwrite races" (commit:
b827e496c8).  The current nilfs_page_mkwrite() is not handling
this value properly.

This corrects nilfs_page_mkwrite() and will resolve the data loss
problem in mmap write.

[This should be applied to every kernel since 2.6.30 but a fix is
 needed for 2.6.37 and prior kernels]

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: stable <stable@kernel.org>  [2.6.38]
2011-03-30 10:45:31 +09:00
..
Kconfig Revert "task_struct: make journal_info conditional" 2009-12-17 13:23:24 -08:00
Makefile nilfs2: get rid of GCDAT inode 2010-10-23 09:24:38 +09:00
alloc.c nilfs2: add free entries count only if clear bit operation succeeded 2011-03-08 14:58:04 +09:00
alloc.h nilfs2: use little-endian bitops 2011-03-23 19:46:18 -07:00
bmap.c nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
bmap.h nilfs2: record used amount of each checkpoint in checkpoint list 2011-03-08 14:58:31 +09:00
btnode.c Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
btnode.h mm: prevent concurrent unmap_mapping_range() on the same inode 2011-02-23 19:52:52 -08:00
btree.c nilfs2: record used amount of each checkpoint in checkpoint list 2011-03-08 14:58:31 +09:00
btree.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
cpfile.c nilfs2: see state of root dentry for mount check of snapshots 2010-10-23 09:24:38 +09:00
cpfile.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
dat.c nilfs2: fix typo in comment of nilfs_dat_move function 2010-11-24 12:51:48 +09:00
dat.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
dir.c nilfs2: add compat ioctl 2011-03-08 14:58:30 +09:00
direct.c nilfs2: record used amount of each checkpoint in checkpoint list 2011-03-08 14:58:31 +09:00
direct.h nilfs2: get rid of nilfs_bmap_union 2010-07-23 10:02:14 +09:00
export.h nilfs2: make snapshots in checkpoint tree exportable 2010-10-23 09:24:34 +09:00
file.c nilfs2: fix data loss in mmap page write for hole blocks 2011-03-30 10:45:31 +09:00
gcinode.c block: remove per-queue plugging 2011-03-10 08:52:07 +01:00
ifile.c nilfs2: call nilfs_error inside bmap routines 2011-01-10 14:05:45 +09:00
ifile.h nilfs2: use iget for all metadata files 2010-10-23 09:24:38 +09:00
inode.c Merge branch 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block 2011-03-24 10:16:26 -07:00
ioctl.c userns: rename is_owner_or_cap to inode_owner_or_capable 2011-03-23 19:47:13 -07:00
mdt.c Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
mdt.h nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
namei.c nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
nilfs.h nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
page.c Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
page.h Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core 2011-03-10 08:58:35 +01:00
recovery.c nilfs2: use sb instance instead of nilfs_sb_info struct 2011-03-09 11:05:08 +09:00
segbuf.c block: kill off REQ_UNPLUG 2011-03-10 08:52:27 +01:00
segbuf.h nilfs2: get rid of macros for segment summary information 2010-07-23 10:02:09 +09:00
segment.c nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
segment.h nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
sufile.c nilfs2: get rid of mi_nilfs back pointer to nilfs object 2010-10-23 09:24:38 +09:00
sufile.h nilfs2: get rid of mi_nilfs back pointer to nilfs object 2010-10-23 09:24:38 +09:00
super.c nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00
the_nilfs.c nilfs2: use sb instance instead of nilfs_sb_info struct 2011-03-09 11:05:08 +09:00
the_nilfs.h nilfs2: get rid of nilfs_sb_info structure 2011-03-09 11:54:26 +09:00