Skip to content

Commit 7e6bd8f

Browse files
committed
cred: Add forward declaration of init_user_ns in all cases.
Acked-by: Serge Hallyn <[email protected]> Signed-off-by: Eric W. Biederman <[email protected]>
1 parent 74ba508 commit 7e6bd8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/cred.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,11 @@ static inline void put_cred(const struct cred *_cred)
357357
#define current_user() (current_cred_xxx(user))
358358
#define current_security() (current_cred_xxx(security))
359359

360+
extern struct user_namespace init_user_ns;
360361
#ifdef CONFIG_USER_NS
361362
#define current_user_ns() (current_cred_xxx(user_ns))
362363
#define task_user_ns(task) (task_cred_xxx((task), user_ns))
363364
#else
364-
extern struct user_namespace init_user_ns;
365365
#define current_user_ns() (&init_user_ns)
366366
#define task_user_ns(task) (&init_user_ns)
367367
#endif

0 commit comments

Comments
 (0)