linux/fs/ext4
Jan Kara a6c0070c1f ext4: fix fdatasync() for files with only i_size changes
commit b71fc079b5 upstream.

Code tracking when transaction needs to be committed on fdatasync(2) forgets
to handle a situation when only inode's i_size is changed. Thus in such
situations fdatasync(2) doesn't force transaction with new i_size to disk
and that can result in wrong i_size after a crash.

Fix the issue by updating inode's i_datasync_tid whenever its size is
updated.

Reported-by: Kristian Nielsen <knielsen@knielsen-hq.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-13 05:28:10 +09:00
..
acl.c userns: rename is_owner_or_cap to inode_owner_or_capable 2011-03-23 19:47:13 -07:00
acl.h fs: provide rcu-walk aware permission i_ops 2011-01-07 17:50:29 +11:00
balloc.c ext4: pass a char * to ext4_count_free() instead of a buffer_head ptr 2012-08-09 08:27:51 -07:00
bitmap.c ext4: pass a char * to ext4_count_free() instead of a buffer_head ptr 2012-08-09 08:27:51 -07:00
block_validity.c ext4: rename {exit,init}_ext4_*() to ext4_{exit,init}_*() 2010-10-27 21:30:14 -04:00
dir.c ext4: Use ext4_error_file() to print the pathname to the corrupted inode 2011-01-10 12:10:55 -05:00
ext4_extents.h ext4: use FIEMAP_EXTENT_LAST flag for last extent in fiemap 2011-06-06 00:06:52 -04:00
ext4_jbd2.c ext4: remove unneeded ext4_journal_get_undo_access 2011-05-09 10:58:45 -04:00
ext4_jbd2.h ext4: ignore EXT4_INODE_JOURNAL_DATA flag with delalloc 2012-04-02 09:27:19 -07:00
ext4.h ext4: pass a char * to ext4_count_free() instead of a buffer_head ptr 2012-08-09 08:27:51 -07:00
extents.c ext4: fix endianness breakage in ext4_split_extent_at() 2012-04-27 09:51:09 -07:00
file.c ext4: Convert ext4 to new truncate calling convention 2011-05-25 17:39:48 -04:00
fsync.c ext4: fix waiting and sending of a barrier in ext4_sync_file() 2011-05-24 12:00:54 -04:00
hash.c ext4: Add support for non-native signed/unsigned htree hash algorithms 2008-10-28 13:21:44 -04:00
ialloc.c ext4: pass a char * to ext4_count_free() instead of a buffer_head ptr 2012-08-09 08:27:51 -07:00
inode.c ext4: fix fdatasync() for files with only i_size changes 2012-10-13 05:28:10 +09:00
ioctl.c ext4: don't set i_flags in EXT4_IOC_SETFLAGS 2012-06-10 00:33:05 +09:00
Kconfig ext4: Don't ask about supporting ext2/3 in ext4 if ext4 is not configured 2009-12-21 10:54:09 -05:00
Makefile ext4: add support for multiple mount protection 2011-05-24 18:31:25 -04:00
mballoc.c ext4: remove mb_groups before tearing down the buddy_cache 2012-06-10 00:33:04 +09:00
mballoc.h ext4: remove alloc_semp 2011-05-09 21:52:36 -04:00
migrate.c ext4: set extents flag when migrating file to use extents 2011-05-03 09:34:42 -04:00
mmp.c ext4: add support for multiple mount protection 2011-05-24 18:31:25 -04:00
move_extent.c ext4: online defrag is not supported for journaled files 2012-10-13 05:28:09 +09:00
namei.c ext4: always set i_op in ext4_mknod() 2012-10-13 05:28:09 +09:00
page-io.c ext4: handle EOF correctly in ext4_bio_write_page() 2011-12-21 12:57:44 -08:00
resize.c ext4: unify the ext4_handle_release_buffer() api 2011-03-20 22:57:02 -04:00
super.c ext4: avoid kmemcheck complaint from reading uninitialized memory 2012-08-26 15:12:11 -07:00
symlink.c ext4: symlink must be handled via filesystem specific operation 2010-05-16 02:00:00 -04:00
xattr_security.c fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00
xattr_trusted.c ext4: constify xattr_handler 2010-05-21 18:31:19 -04:00
xattr_user.c ext4: constify xattr_handler 2010-05-21 18:31:19 -04:00
xattr.c ext4: avoid deadlock on sync-mounted FS w/o journal 2012-05-21 09:40:04 -07:00
xattr.h fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00