]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: update ovl inode before relatime check
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 16 Sep 2016 10:44:20 +0000 (12:44 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 16 Sep 2016 10:44:20 +0000 (12:44 +0200)
commit1581932fa4101dcbc59436298efb4c3a64a06ad4
tree485f1dd152279acde134219e011f3f1dadbe5495
parentf4c051ef9ddc795887bfc9c15f0ba450a5957bf9
vfs: update ovl inode before relatime check

On overlayfs relatime_need_update() needs inode times to be correct on
overlay inode.  But i_mtime and i_ctime are updated by filesystem code on
underlying inode only, so they will be out-of-date on the overlay inode.

This patch copies the times from the underlying inode if needed.  This
can't be done if called from RCU lookup (link following) but link m/ctime
are not updated by fs, so this is all right.

This patch doesn't change functionality for anything but overlayfs.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/inode.c
fs/internal.h
fs/namei.c
include/linux/fs.h