ovl: do not fail because of O_NOATIME
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 14 Dec 2020 14:26:14 +0000 (15:26 +0100)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 7 Feb 2022 08:01:41 +0000 (17:01 +0900)
commitc263f3ac8e5a92778c1c4c02716d5a3dc70dee2f
tree7fbd2e94f3077aabbd9088b6706542b6d5fd9930
parentbac94fa814186176330ea02f611756cb335946b7
ovl: do not fail because of O_NOATIME

In case the file cannot be opened with O_NOATIME because of lack of
capabilities, then clear O_NOATIME instead of failing.

Remove WARN_ON(), since it would now trigger if O_NOATIME was cleared.
Noticed by Amir Goldstein.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
[sw0312.kim: backport v5.11 mainline commit b6650dab404c to resolve overlayfs file open EPERM fail issue in v5.10]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I9c0c74747bb4a208fc68ca561f740281b2b553fe
fs/overlayfs/file.c