ovl: setattr: check permissions before copy-up
Orabug:
23330593
[ Upstream commit
cf9a6784f7c1b5ee2b9159a1246e327c331c5697 ]
Without this copy-up of a file can be forced, even without actually being
allowed to do anything on the file.
[Arnd Bergmann] include <linux/pagemap.h> for PAGE_CACHE_SIZE (used by
MAX_LFS_FILESIZE definition).
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit
c8e1bebf86dff9277e21e9a2769724ca05f40c02)
Signed-off-by: Dan Duval <dan.duval@oracle.com>