cifsd: fix implicit declaration of function 'groups_alloc'
authorNamjae Jeon <namjae.jeon@samsung.com>
Tue, 30 Mar 2021 05:43:16 +0000 (14:43 +0900)
committerSteve French <stfrench@microsoft.com>
Tue, 11 May 2021 00:15:31 +0000 (19:15 -0500)
kernel test robot reported:
    fs/cifsd/smb_common.c: In function 'ksmbd_override_fsids':
>> fs/cifsd/smb_common.c:613:7: error: implicit declaration of function
>> 'groups_alloc'; did you mean 'cgroup_sk_alloc'?
>> [-Werror=implicit-function-declaration]
     613 |  gi = groups_alloc(0);
         |       ^~~~~~~~~~~~
         |       cgroup_sk_alloc
   fs/cifsd/smb_common.c:613:5: warning: assignment to 'struct
group_info *' from 'int' makes pointer from integer without a cast
[-Wint-conversion]
     613 |  gi = groups_alloc(0);
         |     ^
>> fs/cifsd/smb_common.c:618:2: error: implicit declaration of function
>> 'set_groups'; did you mean 'get_cgroup_ns'?
>> [-Werror=implicit-function-declaration]
     618 |  set_groups(cred, gi);
         |  ^~~~~~~~~~
         |  get_cgroup_ns
   cc1: some warnings being treated as errors

This patch add depends on MULTIUSER.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifsd/Kconfig

index 8c5dd9a..37fd912 100644 (file)
@@ -1,6 +1,7 @@
 config SMB_SERVER
        tristate "SMB server support (EXPERIMENTAL)"
        depends on INET
+       depends on MULTIUSER
        select NLS
        select NLS_UTF8
        select CRYPTO