diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:55:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:55:01 -0500 |
commit | d7fc02c7bae7b1cf69269992cf880a43a350cdaa (patch) | |
tree | a43d56fa72913a1cc98a0bbebe054d08581b3a7c /net/rds/af_rds.c | |
parent | ee1262dbc65ce0b6234a915d8432171e8d77f518 (diff) | |
parent | 28b4d5cc17c20786848cdc07b7ea237a309776bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1815 commits)
mac80211: fix reorder buffer release
iwmc3200wifi: Enable wimax core through module parameter
iwmc3200wifi: Add wifi-wimax coexistence mode as a module parameter
iwmc3200wifi: Coex table command does not expect a response
iwmc3200wifi: Update wiwi priority table
iwlwifi: driver version track kernel version
iwlwifi: indicate uCode type when fail dump error/event log
iwl3945: remove duplicated event logging code
b43: fix two warnings
ipw2100: fix rebooting hang with driver loaded
cfg80211: indent regulatory messages with spaces
iwmc3200wifi: fix NULL pointer dereference in pmkid update
mac80211: Fix TX status reporting for injected data frames
ath9k: enable 2GHz band only if the device supports it
airo: Fix integer overflow warning
rt2x00: Fix padding bug on L2PAD devices.
WE: Fix set events not propagated
b43legacy: avoid PPC fault during resume
b43: avoid PPC fault during resume
tcp: fix a timewait refcnt race
...
Fix up conflicts due to sysctl cleanups (dead sysctl_check code and
CTL_UNNUMBERED removed) in
kernel/sysctl_check.c
net/ipv4/sysctl_net_ipv4.c
net/ipv6/addrconf.c
net/sctp/sysctl.c
Diffstat (limited to 'net/rds/af_rds.c')
-rw-r--r-- | net/rds/af_rds.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c index 98e05382fd3c..853c52be781f 100644 --- a/net/rds/af_rds.c +++ b/net/rds/af_rds.c | |||
@@ -174,8 +174,8 @@ static unsigned int rds_poll(struct file *file, struct socket *sock, | |||
174 | mask |= (POLLIN | POLLRDNORM); | 174 | mask |= (POLLIN | POLLRDNORM); |
175 | spin_unlock(&rs->rs_lock); | 175 | spin_unlock(&rs->rs_lock); |
176 | } | 176 | } |
177 | if (!list_empty(&rs->rs_recv_queue) | 177 | if (!list_empty(&rs->rs_recv_queue) || |
178 | || !list_empty(&rs->rs_notify_queue)) | 178 | !list_empty(&rs->rs_notify_queue)) |
179 | mask |= (POLLIN | POLLRDNORM); | 179 | mask |= (POLLIN | POLLRDNORM); |
180 | if (rs->rs_snd_bytes < rds_sk_sndbuf(rs)) | 180 | if (rs->rs_snd_bytes < rds_sk_sndbuf(rs)) |
181 | mask |= (POLLOUT | POLLWRNORM); | 181 | mask |= (POLLOUT | POLLWRNORM); |
@@ -265,6 +265,9 @@ static int rds_setsockopt(struct socket *sock, int level, int optname, | |||
265 | case RDS_GET_MR: | 265 | case RDS_GET_MR: |
266 | ret = rds_get_mr(rs, optval, optlen); | 266 | ret = rds_get_mr(rs, optval, optlen); |
267 | break; | 267 | break; |
268 | case RDS_GET_MR_FOR_DEST: | ||
269 | ret = rds_get_mr_for_dest(rs, optval, optlen); | ||
270 | break; | ||
268 | case RDS_FREE_MR: | 271 | case RDS_FREE_MR: |
269 | ret = rds_free_mr(rs, optval, optlen); | 272 | ret = rds_free_mr(rs, optval, optlen); |
270 | break; | 273 | break; |
@@ -305,8 +308,8 @@ static int rds_getsockopt(struct socket *sock, int level, int optname, | |||
305 | if (len < sizeof(int)) | 308 | if (len < sizeof(int)) |
306 | ret = -EINVAL; | 309 | ret = -EINVAL; |
307 | else | 310 | else |
308 | if (put_user(rs->rs_recverr, (int __user *) optval) | 311 | if (put_user(rs->rs_recverr, (int __user *) optval) || |
309 | || put_user(sizeof(int), optlen)) | 312 | put_user(sizeof(int), optlen)) |
310 | ret = -EFAULT; | 313 | ret = -EFAULT; |
311 | else | 314 | else |
312 | ret = 0; | 315 | ret = 0; |
@@ -407,7 +410,8 @@ static int __rds_create(struct socket *sock, struct sock *sk, int protocol) | |||
407 | return 0; | 410 | return 0; |
408 | } | 411 | } |
409 | 412 | ||
410 | static int rds_create(struct net *net, struct socket *sock, int protocol) | 413 | static int rds_create(struct net *net, struct socket *sock, int protocol, |
414 | int kern) | ||
411 | { | 415 | { |
412 | struct sock *sk; | 416 | struct sock *sk; |
413 | 417 | ||
@@ -431,7 +435,7 @@ void rds_sock_put(struct rds_sock *rs) | |||
431 | sock_put(rds_rs_to_sk(rs)); | 435 | sock_put(rds_rs_to_sk(rs)); |
432 | } | 436 | } |
433 | 437 | ||
434 | static struct net_proto_family rds_family_ops = { | 438 | static const struct net_proto_family rds_family_ops = { |
435 | .family = AF_RDS, | 439 | .family = AF_RDS, |
436 | .create = rds_create, | 440 | .create = rds_create, |
437 | .owner = THIS_MODULE, | 441 | .owner = THIS_MODULE, |