]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Fix and clean up {GET,SET}FLAGS ioctl
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 9 Oct 2017 14:15:30 +0000 (16:15 +0200)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 31 Oct 2017 13:26:57 +0000 (14:26 +0100)
commit246e87e12500a10f5a5133fec5cfd25370323b93
treeb274da6550404d162202afba2b62c6da6a63d460
parentd3b32674c0e5f199832f20b342e5f374bd72410b
gfs2: Fix and clean up {GET,SET}FLAGS ioctl

Switch to a simple array for mapping between the FS_*_FL and GFS_DIF_*
flags.  Clarify how the mapping between FS_JOURNAL_DATA_FL and the
filesystem flags works.  The GFS2_DIF_SYSTEM flag cannot be set from
user space, so remove it from GFS2_FLAGS_USER_SET.  Fail with -EINVAL
when trying to set flags that are not supported instead of silently
ignoring those flags.

Partially fixes xfstest generic/424.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
fs/gfs2/file.c