diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-03-19 04:47:30 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-03-19 04:47:30 -0400 |
commit | 0d4a42f6bd298e826620585e766a154ab460617a (patch) | |
tree | 406d8f7778691d858dbe3e48e4bbb10e99c0a58a /include/linux/user_namespace.h | |
parent | d62b4892f3d9f7dd2002e5309be10719d6805b0f (diff) | |
parent | a937536b868b8369b98967929045f1df54234323 (diff) |
Merge tag 'v3.9-rc3' into drm-intel-next-queued
Backmerge so that I can merge Imre Deak's coalesced sg entries fixes,
which depend upon the new for_each_sg_page introduce in
commit a321e91b6d73ed011ffceed384c40d2785cf723b
Author: Imre Deak <imre.deak@intel.com>
Date: Wed Feb 27 17:02:56 2013 -0800
lib/scatterlist: add simple page iterator
The merge itself is just two trivial conflicts:
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/linux/user_namespace.h')
-rw-r--r-- | include/linux/user_namespace.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index b9bd2e6c73cc..4ce009324933 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
@@ -21,7 +21,7 @@ struct user_namespace { | |||
21 | struct uid_gid_map uid_map; | 21 | struct uid_gid_map uid_map; |
22 | struct uid_gid_map gid_map; | 22 | struct uid_gid_map gid_map; |
23 | struct uid_gid_map projid_map; | 23 | struct uid_gid_map projid_map; |
24 | struct kref kref; | 24 | atomic_t count; |
25 | struct user_namespace *parent; | 25 | struct user_namespace *parent; |
26 | kuid_t owner; | 26 | kuid_t owner; |
27 | kgid_t group; | 27 | kgid_t group; |
@@ -35,18 +35,18 @@ extern struct user_namespace init_user_ns; | |||
35 | static inline struct user_namespace *get_user_ns(struct user_namespace *ns) | 35 | static inline struct user_namespace *get_user_ns(struct user_namespace *ns) |
36 | { | 36 | { |
37 | if (ns) | 37 | if (ns) |
38 | kref_get(&ns->kref); | 38 | atomic_inc(&ns->count); |
39 | return ns; | 39 | return ns; |
40 | } | 40 | } |
41 | 41 | ||
42 | extern int create_user_ns(struct cred *new); | 42 | extern int create_user_ns(struct cred *new); |
43 | extern int unshare_userns(unsigned long unshare_flags, struct cred **new_cred); | 43 | extern int unshare_userns(unsigned long unshare_flags, struct cred **new_cred); |
44 | extern void free_user_ns(struct kref *kref); | 44 | extern void free_user_ns(struct user_namespace *ns); |
45 | 45 | ||
46 | static inline void put_user_ns(struct user_namespace *ns) | 46 | static inline void put_user_ns(struct user_namespace *ns) |
47 | { | 47 | { |
48 | if (ns) | 48 | if (ns && atomic_dec_and_test(&ns->count)) |
49 | kref_put(&ns->kref, free_user_ns); | 49 | free_user_ns(ns); |
50 | } | 50 | } |
51 | 51 | ||
52 | struct seq_operations; | 52 | struct seq_operations; |