diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2011-07-25 13:59:46 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-07-25 14:53:52 -0400 |
commit | 5f00bcb38ef9a980a33c6dbdc0044964b05f22dd (patch) | |
tree | 3175fb9375aecb50bde1be0bf4fa8aa8155131d6 /net/sunrpc | |
parent | 34006cee28f7344f9557a4be3816c7891b1bbab1 (diff) | |
parent | b6844e8f64920cdee620157252169ba63afb0c89 (diff) |
Merge branch 'master' into devel and apply fixup from Stephen Rothwell:
vfs/nfs: fixup for nfs_open_context change
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/auth.c | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 46 | ||||
-rw-r--r-- | net/sunrpc/clnt.c | 36 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 14 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 1 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 1 |
6 files changed, 49 insertions, 51 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index cd6e4aa19dbf..727e506cacda 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c | |||
@@ -626,7 +626,7 @@ rpcauth_refreshcred(struct rpc_task *task) | |||
626 | if (err < 0) | 626 | if (err < 0) |
627 | goto out; | 627 | goto out; |
628 | cred = task->tk_rqstp->rq_cred; | 628 | cred = task->tk_rqstp->rq_cred; |
629 | }; | 629 | } |
630 | dprintk("RPC: %5u refreshing %s cred %p\n", | 630 | dprintk("RPC: %5u refreshing %s cred %p\n", |
631 | task->tk_pid, cred->cr_auth->au_ops->au_name, cred); | 631 | task->tk_pid, cred->cr_auth->au_ops->au_name, cred); |
632 | 632 | ||
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 5daf6cc4faea..364eb45e989d 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -1421,18 +1421,16 @@ gss_wrap_req(struct rpc_task *task, | |||
1421 | goto out; | 1421 | goto out; |
1422 | } | 1422 | } |
1423 | switch (gss_cred->gc_service) { | 1423 | switch (gss_cred->gc_service) { |
1424 | case RPC_GSS_SVC_NONE: | 1424 | case RPC_GSS_SVC_NONE: |
1425 | gss_wrap_req_encode(encode, rqstp, p, obj); | 1425 | gss_wrap_req_encode(encode, rqstp, p, obj); |
1426 | status = 0; | 1426 | status = 0; |
1427 | break; | 1427 | break; |
1428 | case RPC_GSS_SVC_INTEGRITY: | 1428 | case RPC_GSS_SVC_INTEGRITY: |
1429 | status = gss_wrap_req_integ(cred, ctx, encode, | 1429 | status = gss_wrap_req_integ(cred, ctx, encode, rqstp, p, obj); |
1430 | rqstp, p, obj); | 1430 | break; |
1431 | break; | 1431 | case RPC_GSS_SVC_PRIVACY: |
1432 | case RPC_GSS_SVC_PRIVACY: | 1432 | status = gss_wrap_req_priv(cred, ctx, encode, rqstp, p, obj); |
1433 | status = gss_wrap_req_priv(cred, ctx, encode, | 1433 | break; |
1434 | rqstp, p, obj); | ||
1435 | break; | ||
1436 | } | 1434 | } |
1437 | out: | 1435 | out: |
1438 | gss_put_ctx(ctx); | 1436 | gss_put_ctx(ctx); |
@@ -1531,18 +1529,18 @@ gss_unwrap_resp(struct rpc_task *task, | |||
1531 | if (ctx->gc_proc != RPC_GSS_PROC_DATA) | 1529 | if (ctx->gc_proc != RPC_GSS_PROC_DATA) |
1532 | goto out_decode; | 1530 | goto out_decode; |
1533 | switch (gss_cred->gc_service) { | 1531 | switch (gss_cred->gc_service) { |
1534 | case RPC_GSS_SVC_NONE: | 1532 | case RPC_GSS_SVC_NONE: |
1535 | break; | 1533 | break; |
1536 | case RPC_GSS_SVC_INTEGRITY: | 1534 | case RPC_GSS_SVC_INTEGRITY: |
1537 | status = gss_unwrap_resp_integ(cred, ctx, rqstp, &p); | 1535 | status = gss_unwrap_resp_integ(cred, ctx, rqstp, &p); |
1538 | if (status) | 1536 | if (status) |
1539 | goto out; | 1537 | goto out; |
1540 | break; | 1538 | break; |
1541 | case RPC_GSS_SVC_PRIVACY: | 1539 | case RPC_GSS_SVC_PRIVACY: |
1542 | status = gss_unwrap_resp_priv(cred, ctx, rqstp, &p); | 1540 | status = gss_unwrap_resp_priv(cred, ctx, rqstp, &p); |
1543 | if (status) | 1541 | if (status) |
1544 | goto out; | 1542 | goto out; |
1545 | break; | 1543 | break; |
1546 | } | 1544 | } |
1547 | /* take into account extra slack for integrity and privacy cases: */ | 1545 | /* take into account extra slack for integrity and privacy cases: */ |
1548 | cred->cr_auth->au_rslack = cred->cr_auth->au_verfsize + (p - savedp) | 1546 | cred->cr_auth->au_rslack = cred->cr_auth->au_verfsize + (p - savedp) |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index d3fe866f57ac..c5347d29cfb7 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -97,8 +97,7 @@ static int | |||
97 | rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) | 97 | rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) |
98 | { | 98 | { |
99 | static uint32_t clntid; | 99 | static uint32_t clntid; |
100 | struct nameidata nd; | 100 | struct path path, dir; |
101 | struct path path; | ||
102 | char name[15]; | 101 | char name[15]; |
103 | struct qstr q = { | 102 | struct qstr q = { |
104 | .name = name, | 103 | .name = name, |
@@ -113,7 +112,7 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) | |||
113 | path.mnt = rpc_get_mount(); | 112 | path.mnt = rpc_get_mount(); |
114 | if (IS_ERR(path.mnt)) | 113 | if (IS_ERR(path.mnt)) |
115 | return PTR_ERR(path.mnt); | 114 | return PTR_ERR(path.mnt); |
116 | error = vfs_path_lookup(path.mnt->mnt_root, path.mnt, dir_name, 0, &nd); | 115 | error = vfs_path_lookup(path.mnt->mnt_root, path.mnt, dir_name, 0, &dir); |
117 | if (error) | 116 | if (error) |
118 | goto err; | 117 | goto err; |
119 | 118 | ||
@@ -121,7 +120,7 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) | |||
121 | q.len = snprintf(name, sizeof(name), "clnt%x", (unsigned int)clntid++); | 120 | q.len = snprintf(name, sizeof(name), "clnt%x", (unsigned int)clntid++); |
122 | name[sizeof(name) - 1] = '\0'; | 121 | name[sizeof(name) - 1] = '\0'; |
123 | q.hash = full_name_hash(q.name, q.len); | 122 | q.hash = full_name_hash(q.name, q.len); |
124 | path.dentry = rpc_create_client_dir(nd.path.dentry, &q, clnt); | 123 | path.dentry = rpc_create_client_dir(dir.dentry, &q, clnt); |
125 | if (!IS_ERR(path.dentry)) | 124 | if (!IS_ERR(path.dentry)) |
126 | break; | 125 | break; |
127 | error = PTR_ERR(path.dentry); | 126 | error = PTR_ERR(path.dentry); |
@@ -132,11 +131,11 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) | |||
132 | goto err_path_put; | 131 | goto err_path_put; |
133 | } | 132 | } |
134 | } | 133 | } |
135 | path_put(&nd.path); | 134 | path_put(&dir); |
136 | clnt->cl_path = path; | 135 | clnt->cl_path = path; |
137 | return 0; | 136 | return 0; |
138 | err_path_put: | 137 | err_path_put: |
139 | path_put(&nd.path); | 138 | path_put(&dir); |
140 | err: | 139 | err: |
141 | rpc_put_mount(); | 140 | rpc_put_mount(); |
142 | return error; | 141 | return error; |
@@ -1665,19 +1664,18 @@ rpc_verify_header(struct rpc_task *task) | |||
1665 | if (--len < 0) | 1664 | if (--len < 0) |
1666 | goto out_overflow; | 1665 | goto out_overflow; |
1667 | switch ((n = ntohl(*p++))) { | 1666 | switch ((n = ntohl(*p++))) { |
1668 | case RPC_AUTH_ERROR: | 1667 | case RPC_AUTH_ERROR: |
1669 | break; | 1668 | break; |
1670 | case RPC_MISMATCH: | 1669 | case RPC_MISMATCH: |
1671 | dprintk("RPC: %5u %s: RPC call version " | 1670 | dprintk("RPC: %5u %s: RPC call version mismatch!\n", |
1672 | "mismatch!\n", | 1671 | task->tk_pid, __func__); |
1673 | task->tk_pid, __func__); | 1672 | error = -EPROTONOSUPPORT; |
1674 | error = -EPROTONOSUPPORT; | 1673 | goto out_err; |
1675 | goto out_err; | 1674 | default: |
1676 | default: | 1675 | dprintk("RPC: %5u %s: RPC call rejected, " |
1677 | dprintk("RPC: %5u %s: RPC call rejected, " | 1676 | "unknown error: %x\n", |
1678 | "unknown error: %x\n", | 1677 | task->tk_pid, __func__, n); |
1679 | task->tk_pid, __func__, n); | 1678 | goto out_eio; |
1680 | goto out_eio; | ||
1681 | } | 1679 | } |
1682 | if (--len < 0) | 1680 | if (--len < 0) |
1683 | goto out_overflow; | 1681 | goto out_overflow; |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 72bc53683965..b181e3441323 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -456,13 +456,13 @@ rpc_get_inode(struct super_block *sb, umode_t mode) | |||
456 | inode->i_ino = get_next_ino(); | 456 | inode->i_ino = get_next_ino(); |
457 | inode->i_mode = mode; | 457 | inode->i_mode = mode; |
458 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; | 458 | inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; |
459 | switch(mode & S_IFMT) { | 459 | switch (mode & S_IFMT) { |
460 | case S_IFDIR: | 460 | case S_IFDIR: |
461 | inode->i_fop = &simple_dir_operations; | 461 | inode->i_fop = &simple_dir_operations; |
462 | inode->i_op = &simple_dir_inode_operations; | 462 | inode->i_op = &simple_dir_inode_operations; |
463 | inc_nlink(inode); | 463 | inc_nlink(inode); |
464 | default: | 464 | default: |
465 | break; | 465 | break; |
466 | } | 466 | } |
467 | return inode; | 467 | return inode; |
468 | } | 468 | } |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index c3c232a88d94..a385430c722a 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <linux/sunrpc/svc_xprt.h> | 42 | #include <linux/sunrpc/svc_xprt.h> |
43 | #include <linux/sunrpc/debug.h> | 43 | #include <linux/sunrpc/debug.h> |
44 | #include <linux/sunrpc/rpc_rdma.h> | 44 | #include <linux/sunrpc/rpc_rdma.h> |
45 | #include <linux/interrupt.h> | ||
45 | #include <linux/sched.h> | 46 | #include <linux/sched.h> |
46 | #include <linux/slab.h> | 47 | #include <linux/slab.h> |
47 | #include <linux/spinlock.h> | 48 | #include <linux/spinlock.h> |
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 80f8da344df5..28236bab57f9 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -47,6 +47,7 @@ | |||
47 | * o buffer memory | 47 | * o buffer memory |
48 | */ | 48 | */ |
49 | 49 | ||
50 | #include <linux/interrupt.h> | ||
50 | #include <linux/pci.h> /* for Tavor hack below */ | 51 | #include <linux/pci.h> /* for Tavor hack below */ |
51 | #include <linux/slab.h> | 52 | #include <linux/slab.h> |
52 | 53 | ||