]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: re-instantiate the removed BTRFS_SUBVOL_CREATE_ASYNC definition
authorEugene Syromiatnikov <esyr@redhat.com>
Wed, 1 Apr 2020 03:26:50 +0000 (05:26 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 10 Apr 2020 16:48:27 +0000 (18:48 +0200)
commit39bb3fdcef12b2edd3460757faa751cca95e595f
tree610ac6b7824a2d59057faf0039ece2b05c4b0531
parentca8e73acb6f62464506e178108290c53947f1e7e
btrfs: re-instantiate the removed BTRFS_SUBVOL_CREATE_ASYNC definition

The commit 522a260bfef3fa22 ("btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC
support") breaks strace build with the kernel headers from git:

    btrfs.c: In function "btrfs_test_subvol_ioctls":
    btrfs.c:531:23: error: "BTRFS_SUBVOL_CREATE_ASYNC" undeclared (first use
    in this function)
       vol_args_v2.flags = BTRFS_SUBVOL_CREATE_ASYNC;

Moreover, it is improper to break UAPI, strace uses the definitions to
decode ioctls that are considered part of public API.

Restore the macro definition and put it under "#ifndef __KERNEL__"
in order to prevent inadvertent in-kernel usage.

Fixes: 522a260bfef3fa22 ("btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC support")
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
include/uapi/linux/btrfs.h