selftests/mount_setattr: fix redefine struct mount_attr build error
authorShuah Khan <skhan@linuxfoundation.org>
Mon, 13 Feb 2023 18:20:07 +0000 (11:20 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 13 Feb 2023 23:37:18 +0000 (16:37 -0700)
Fix the following build error due to redefining struct mount_attr by
removing duplicate define from mount_setattr_test.c

gcc -g -isystem .../tools/testing/selftests/../../../usr/include -Wall -O2 -pthread     mount_setattr_test.c  -o .../tools/testing/selftests/mount_setattr/mount_setattr_test
mount_setattr_test.c:107:8: error: redefinition of â€˜struct mount_attr’
  107 | struct mount_attr {
      |        ^~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/sys/mount.h:32,
                 from mount_setattr_test.c:10:
.../usr/include/linux/mount.h:129:8: note: originally defined here
  129 | struct mount_attr {
      |        ^~~~~~~~~~
make: *** [../lib.mk:145: .../tools/testing/selftests/mount_setattr/mount_setattr_test] Error 1

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/mount_setattr/mount_setattr_test.c

index 8c5fea68ae677b6d9e4cca4acf9a1b7e0d637b14..582669ca38e9dd98ea2236577e5a4313ea887742 100644 (file)
        #else
                #define __NR_mount_setattr 442
        #endif
-
-struct mount_attr {
-       __u64 attr_set;
-       __u64 attr_clr;
-       __u64 propagation;
-       __u64 userns_fd;
-};
 #endif
 
 #ifndef __NR_open_tree