diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-24 01:03:34 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-24 01:03:34 -0400 |
| commit | 75a95178dafb5c8d69b4abe45ea746a9cea23142 (patch) | |
| tree | 1dbf80c83d9521dcdebc9e670f48da6c1ba34187 /include/net | |
| parent | 8531c5ffbca65f6df868637c26e6df6f88bff738 (diff) | |
| parent | 0572e3da3ff5c3744b2f606ecf296d5f89a4bbdf (diff) | |
Merge upstream into 'upstream' branch of netdev-2.6.git.
Hand fix merge conflict in drivers/net/tokenring/Kconfig.
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/ax25.h | 18 | ||||
| -rw-r--r-- | include/net/sock.h | 5 |
2 files changed, 21 insertions, 2 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h index 828a3a93dda1..3696f988a9f1 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
| @@ -139,11 +139,25 @@ enum { | |||
| 139 | #define AX25_DEF_DS_TIMEOUT (3 * 60 * HZ) /* DAMA timeout 3 minutes */ | 139 | #define AX25_DEF_DS_TIMEOUT (3 * 60 * HZ) /* DAMA timeout 3 minutes */ |
| 140 | 140 | ||
| 141 | typedef struct ax25_uid_assoc { | 141 | typedef struct ax25_uid_assoc { |
| 142 | struct ax25_uid_assoc *next; | 142 | struct hlist_node uid_node; |
| 143 | atomic_t refcount; | ||
| 143 | uid_t uid; | 144 | uid_t uid; |
| 144 | ax25_address call; | 145 | ax25_address call; |
| 145 | } ax25_uid_assoc; | 146 | } ax25_uid_assoc; |
| 146 | 147 | ||
| 148 | #define ax25_uid_for_each(__ax25, node, list) \ | ||
| 149 | hlist_for_each_entry(__ax25, node, list, uid_node) | ||
| 150 | |||
| 151 | #define ax25_uid_hold(ax25) \ | ||
| 152 | atomic_inc(&((ax25)->refcount)) | ||
| 153 | |||
| 154 | static inline void ax25_uid_put(ax25_uid_assoc *assoc) | ||
| 155 | { | ||
| 156 | if (atomic_dec_and_test(&assoc->refcount)) { | ||
| 157 | kfree(assoc); | ||
| 158 | } | ||
| 159 | } | ||
| 160 | |||
| 147 | typedef struct { | 161 | typedef struct { |
| 148 | ax25_address calls[AX25_MAX_DIGIS]; | 162 | ax25_address calls[AX25_MAX_DIGIS]; |
| 149 | unsigned char repeated[AX25_MAX_DIGIS]; | 163 | unsigned char repeated[AX25_MAX_DIGIS]; |
| @@ -376,7 +390,7 @@ extern unsigned long ax25_display_timer(struct timer_list *); | |||
| 376 | 390 | ||
| 377 | /* ax25_uid.c */ | 391 | /* ax25_uid.c */ |
| 378 | extern int ax25_uid_policy; | 392 | extern int ax25_uid_policy; |
| 379 | extern ax25_address *ax25_findbyuid(uid_t); | 393 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); |
| 380 | extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 394 | extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
| 381 | extern struct file_operations ax25_uid_fops; | 395 | extern struct file_operations ax25_uid_fops; |
| 382 | extern void ax25_uid_free(void); | 396 | extern void ax25_uid_free(void); |
diff --git a/include/net/sock.h b/include/net/sock.h index a1042d08becd..e9b1dbab90d0 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -384,6 +384,11 @@ enum sock_flags { | |||
| 384 | SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */ | 384 | SOCK_QUEUE_SHRUNK, /* write queue has been shrunk recently */ |
| 385 | }; | 385 | }; |
| 386 | 386 | ||
| 387 | static inline void sock_copy_flags(struct sock *nsk, struct sock *osk) | ||
| 388 | { | ||
| 389 | nsk->sk_flags = osk->sk_flags; | ||
| 390 | } | ||
| 391 | |||
| 387 | static inline void sock_set_flag(struct sock *sk, enum sock_flags flag) | 392 | static inline void sock_set_flag(struct sock *sk, enum sock_flags flag) |
| 388 | { | 393 | { |
| 389 | __set_bit(flag, &sk->sk_flags); | 394 | __set_bit(flag, &sk->sk_flags); |
