[Ocfs2-commits] zab commits r2561 -
branches/ocfs2-1.0/fs/ocfs2/cluster
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Sep 6 15:51:17 CDT 2005
Author: zab
Signed-off-by: jlbec
Date: 2005-09-06 15:51:16 -0500 (Tue, 06 Sep 2005)
New Revision: 2561
Modified:
branches/ocfs2-1.0/fs/ocfs2/cluster/tcp.c
Log:
o bring gfp net fixes in from commit 2560 on trunk:
[2560] Set sk_allocation and use non-waiting gfp masks in other fs messaging
Signed-off-by: jlbec
Modified: branches/ocfs2-1.0/fs/ocfs2/cluster/tcp.c
===================================================================
--- branches/ocfs2-1.0/fs/ocfs2/cluster/tcp.c 2005-09-06 20:50:28 UTC (rev 2560)
+++ branches/ocfs2-1.0/fs/ocfs2/cluster/tcp.c 2005-09-06 20:51:16 UTC (rev 2561)
@@ -185,7 +185,7 @@
int ret = 0;
do {
- if (!idr_pre_get(&nn->nn_status_idr, GFP_NOFS)) {
+ if (!idr_pre_get(&nn->nn_status_idr, GFP_ATOMIC)) {
ret = -EAGAIN;
break;
}
@@ -699,7 +699,7 @@
goto out;
}
- nmh = kcalloc(1, sizeof(struct o2net_msg_handler), GFP_KERNEL);
+ nmh = kcalloc(1, sizeof(struct o2net_msg_handler), GFP_NOFS);
if (nmh == NULL) {
ret = -ENOMEM;
goto out;
@@ -944,14 +944,14 @@
/* build up our iovec */
iovlen = caller_iovlen + 1;
- iov = kmalloc(sizeof(struct iovec) * iovlen, GFP_KERNEL);
+ iov = kmalloc(sizeof(struct iovec) * iovlen, GFP_ATOMIC);
if (iov == NULL) {
mlog(0, "failed to %zu element iovec!\n", iovlen);
ret = -ENOMEM;
goto out;
}
- msg = kmalloc(sizeof(o2net_msg), GFP_KERNEL);
+ msg = kmalloc(sizeof(o2net_msg), GFP_ATOMIC);
if (!msg) {
mlog(0, "failed to allocate a o2net_msg!\n");
ret = -ENOMEM;
@@ -1402,6 +1402,8 @@
}
sc->sc_sock = sock; /* freed by sc_kref_release */
+ sock->sk->sk_allocation = GFP_ATOMIC;
+
myaddr.sin_family = AF_INET;
myaddr.sin_port = htons(0); /* any port */
@@ -1608,6 +1610,8 @@
if (ret < 0)
goto out;
+ new_sock->sk->sk_allocation = GFP_ATOMIC;
+
ret = o2net_set_nodelay(new_sock);
if (ret) {
mlog(ML_ERROR, "setting TCP_NODELAY failed with %d\n", ret);
@@ -1741,6 +1745,8 @@
goto out;
}
+ sock->sk->sk_allocation = GFP_ATOMIC;
+
write_lock_bh(&sock->sk->sk_callback_lock);
sock->sk->sk_user_data = sock->sk->sk_data_ready;
sock->sk->sk_data_ready = o2net_listen_data_ready;
More information about the Ocfs2-commits
mailing list