]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dax: use pfn_mkwrite to update c/mtime + freeze protection
authorYigal Korman <yigal@plexistor.com>
Tue, 7 Apr 2015 23:44:38 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:38 +0000 (09:44 +1000)
commitdac1bd2007afe62c3e744bad446d4f2644e0291a
tree4d484a399f43f9f65183588e92fa282ac6a8a532
parent8dca51557fa2ca54a843b0273e7f00cb15169120
dax: use pfn_mkwrite to update c/mtime + freeze protection

[v1]
Without this patch, c/mtime is not updated correctly when mmap'ed page is
first read from and then written to.

A new xfstest is submitted for testing this (generic/080)

[v2]
Jan Kara has pointed out that if we add the
sb_start/end_pagefault pair in the new pfn_mkwrite we
are then fixing another bug where: A user could start
writing to the page while filesystem is frozen.

Signed-off-by: Yigal Korman <yigal@plexistor.com>
Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/dax.c
fs/ext2/file.c
fs/ext4/file.c
include/linux/fs.h