ovl: support [S|G]ETFLAGS and FS[S|G]ETXATTR ioctls for directories
authorAmir Goldstein <amir73il@gmail.com>
Tue, 29 Sep 2020 07:28:47 +0000 (15:28 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 6 Oct 2020 13:38:14 +0000 (15:38 +0200)
commit61536bed2149b082748f8a38c593d915ff3e5957
tree650bd20e89098381d36658935b3554ccee1b33ee
parent8f6ee74c27860d4a4c6e0f8cf772bb2afc184bcb
ovl: support [S|G]ETFLAGS and FS[S|G]ETXATTR ioctls for directories

[S|G]ETFLAGS and FS[S|G]ETXATTR ioctls are applicable to both files and
directories, so add ioctl operations to dir as well.

We teach ovl_real_fdget() to get the realfile of directories which use
a different type of file->private_data.

Ifdef away compat ioctl implementation to conform to standard practice.

With this change, xfstest generic/079 which tests these ioctls on files
and directories passes.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/file.c
fs/overlayfs/overlayfs.h
fs/overlayfs/readdir.c