ovl: take mnt_want_write() for removing impure xattr
authorAmir Goldstein <amir73il@gmail.com>
Wed, 3 Jan 2018 16:54:42 +0000 (18:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:23:10 +0000 (20:23 +0100)
commitc7aee3941e1e10a662e5b22f345933280f0caac8
tree80756b576360349c475fd250a8189067fabf4354
parente822be7502707b994a4847f618b49f17d1c02dae
ovl: take mnt_want_write() for removing impure xattr

commit a5a927a7c82e28ea76599dee4019c41e372c911f upstream.

The optimization in ovl_cache_get_impure() that tries to remove an
unneeded "impure" xattr needs to take mnt_want_write() on upper fs.

Fixes: 4edb83bb1041 ("ovl: constant d_ino for non-merge dirs")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/overlayfs/readdir.c