dax: use pfn_mkwrite to update c/mtime + freeze protection
authorBoaz Harrosh <[email protected]>
Wed, 15 Apr 2015 23:15:14 +0000 (16:15 -0700)
committerLinus Torvalds <[email protected]>
Wed, 15 Apr 2015 23:35:20 +0000 (16:35 -0700)
commit0e3b210ce1722168227cb3bc7746256d0c0afece
tree61e29f2d7d7c5e12029cafcbb0c42165a2cc1f20
parentdd9061846a3ba01b0fa45423aaa087e4a69187fa
dax: use pfn_mkwrite to update c/mtime + freeze protection

From: Yigal Korman <[email protected]>

[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 <[email protected]>
Signed-off-by: Boaz Harrosh <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/dax.c
fs/ext2/file.c
fs/ext4/file.c
include/linux/fs.h