vfs: don't open real
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 6 Jul 2018 21:57:06 +0000 (23:57 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 18 Jul 2018 13:44:42 +0000 (15:44 +0200)
commita6518f73e60e5044656d1ba587e7463479a9381a
treeb7105c1ee7e5abffba3d450d2df6c157f806d1aa
parent8ede205541ff05bd096749a9f00bde6d754b4e22
vfs: don't open real

Let overlayfs do its thing when opening a file.

This enables stacking and fixes the corner case when a file is opened for
read, modified through a writable open, and data is read from the read-only
file.  After this patch the read-only open will not return stale data even
in this case.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/open.c