diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2011-12-26 07:43:49 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-31 18:20:25 -0500 |
commit | d706ed1f50d3f7fae61a177183562179abe8e4bb (patch) | |
tree | 8f66aaf4276a616ac6006c3fb96b13d6b543143d | |
parent | d0fe13ba9178d3bb78bbd8577bdedc00f76b7a66 (diff) |
SUNPRC: cleanup RPC PipeFS pipes upcall interface
RPC pipe upcall doesn't requires only private pipe data. Thus RPC inode
references in this code can be removed.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | fs/nfs/blocklayout/blocklayoutdev.c | 2 | ||||
-rw-r--r-- | fs/nfs/blocklayout/blocklayoutdm.c | 2 | ||||
-rw-r--r-- | fs/nfs/idmap.c | 4 | ||||
-rw-r--r-- | include/linux/sunrpc/rpc_pipe_fs.h | 2 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 3 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 3 |
6 files changed, 7 insertions, 9 deletions
diff --git a/fs/nfs/blocklayout/blocklayoutdev.c b/fs/nfs/blocklayout/blocklayoutdev.c index d08ba9107fde..81019190e46d 100644 --- a/fs/nfs/blocklayout/blocklayoutdev.c +++ b/fs/nfs/blocklayout/blocklayoutdev.c | |||
@@ -146,7 +146,7 @@ nfs4_blk_decode_device(struct nfs_server *server, | |||
146 | 146 | ||
147 | dprintk("%s CALLING USERSPACE DAEMON\n", __func__); | 147 | dprintk("%s CALLING USERSPACE DAEMON\n", __func__); |
148 | add_wait_queue(&bl_wq, &wq); | 148 | add_wait_queue(&bl_wq, &wq); |
149 | rc = rpc_queue_upcall(bl_device_pipe->d_inode, &msg); | 149 | rc = rpc_queue_upcall(RPC_I(bl_device_pipe->d_inode)->pipe, &msg); |
150 | if (rc < 0) { | 150 | if (rc < 0) { |
151 | remove_wait_queue(&bl_wq, &wq); | 151 | remove_wait_queue(&bl_wq, &wq); |
152 | rv = ERR_PTR(rc); | 152 | rv = ERR_PTR(rc); |
diff --git a/fs/nfs/blocklayout/blocklayoutdm.c b/fs/nfs/blocklayout/blocklayoutdm.c index d055c7558073..3c38244a8724 100644 --- a/fs/nfs/blocklayout/blocklayoutdm.c +++ b/fs/nfs/blocklayout/blocklayoutdm.c | |||
@@ -66,7 +66,7 @@ static void dev_remove(dev_t dev) | |||
66 | msg.len = sizeof(bl_msg) + bl_msg.totallen; | 66 | msg.len = sizeof(bl_msg) + bl_msg.totallen; |
67 | 67 | ||
68 | add_wait_queue(&bl_wq, &wq); | 68 | add_wait_queue(&bl_wq, &wq); |
69 | if (rpc_queue_upcall(bl_device_pipe->d_inode, &msg) < 0) { | 69 | if (rpc_queue_upcall(RPC_I(bl_device_pipe->d_inode)->pipe, &msg) < 0) { |
70 | remove_wait_queue(&bl_wq, &wq); | 70 | remove_wait_queue(&bl_wq, &wq); |
71 | goto out; | 71 | goto out; |
72 | } | 72 | } |
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c index 2c05f1991e1e..3c63c47c793d 100644 --- a/fs/nfs/idmap.c +++ b/fs/nfs/idmap.c | |||
@@ -589,7 +589,7 @@ nfs_idmap_id(struct idmap *idmap, struct idmap_hashtable *h, | |||
589 | msg.len = sizeof(*im); | 589 | msg.len = sizeof(*im); |
590 | 590 | ||
591 | add_wait_queue(&idmap->idmap_wq, &wq); | 591 | add_wait_queue(&idmap->idmap_wq, &wq); |
592 | if (rpc_queue_upcall(idmap->idmap_dentry->d_inode, &msg) < 0) { | 592 | if (rpc_queue_upcall(RPC_I(idmap->idmap_dentry->d_inode)->pipe, &msg) < 0) { |
593 | remove_wait_queue(&idmap->idmap_wq, &wq); | 593 | remove_wait_queue(&idmap->idmap_wq, &wq); |
594 | goto out; | 594 | goto out; |
595 | } | 595 | } |
@@ -650,7 +650,7 @@ nfs_idmap_name(struct idmap *idmap, struct idmap_hashtable *h, | |||
650 | 650 | ||
651 | add_wait_queue(&idmap->idmap_wq, &wq); | 651 | add_wait_queue(&idmap->idmap_wq, &wq); |
652 | 652 | ||
653 | if (rpc_queue_upcall(idmap->idmap_dentry->d_inode, &msg) < 0) { | 653 | if (rpc_queue_upcall(RPC_I(idmap->idmap_dentry->d_inode)->pipe, &msg) < 0) { |
654 | remove_wait_queue(&idmap->idmap_wq, &wq); | 654 | remove_wait_queue(&idmap->idmap_wq, &wq); |
655 | goto out; | 655 | goto out; |
656 | } | 656 | } |
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index 57512c23d34c..3ebc257e2b43 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -64,7 +64,7 @@ extern void rpc_put_sb_net(const struct net *net); | |||
64 | 64 | ||
65 | extern ssize_t rpc_pipe_generic_upcall(struct file *, struct rpc_pipe_msg *, | 65 | extern ssize_t rpc_pipe_generic_upcall(struct file *, struct rpc_pipe_msg *, |
66 | char __user *, size_t); | 66 | char __user *, size_t); |
67 | extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); | 67 | extern int rpc_queue_upcall(struct rpc_pipe *, struct rpc_pipe_msg *); |
68 | 68 | ||
69 | struct rpc_clnt; | 69 | struct rpc_clnt; |
70 | extern struct dentry *rpc_create_client_dir(struct dentry *, struct qstr *, struct rpc_clnt *); | 70 | extern struct dentry *rpc_create_client_dir(struct dentry *, struct qstr *, struct rpc_clnt *); |
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index e933484e55ef..4157e3151581 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -473,8 +473,7 @@ gss_setup_upcall(struct rpc_clnt *clnt, struct gss_auth *gss_auth, struct rpc_cr | |||
473 | return gss_new; | 473 | return gss_new; |
474 | gss_msg = gss_add_msg(gss_new); | 474 | gss_msg = gss_add_msg(gss_new); |
475 | if (gss_msg == gss_new) { | 475 | if (gss_msg == gss_new) { |
476 | struct inode *inode = &gss_new->inode->vfs_inode; | 476 | int res = rpc_queue_upcall(gss_new->inode->pipe, &gss_new->msg); |
477 | int res = rpc_queue_upcall(inode, &gss_new->msg); | ||
478 | if (res) { | 477 | if (res) { |
479 | gss_unhash_msg(gss_new); | 478 | gss_unhash_msg(gss_new); |
480 | gss_msg = ERR_PTR(res); | 479 | gss_msg = ERR_PTR(res); |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 299b1a3c3e49..4093da79d512 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -130,9 +130,8 @@ EXPORT_SYMBOL_GPL(rpc_pipe_generic_upcall); | |||
130 | * initialize the fields of @msg (other than @msg->list) appropriately. | 130 | * initialize the fields of @msg (other than @msg->list) appropriately. |
131 | */ | 131 | */ |
132 | int | 132 | int |
133 | rpc_queue_upcall(struct inode *inode, struct rpc_pipe_msg *msg) | 133 | rpc_queue_upcall(struct rpc_pipe *pipe, struct rpc_pipe_msg *msg) |
134 | { | 134 | { |
135 | struct rpc_pipe *pipe = RPC_I(inode)->pipe; | ||
136 | int res = -EPIPE; | 135 | int res = -EPIPE; |
137 | 136 | ||
138 | spin_lock(&pipe->lock); | 137 | spin_lock(&pipe->lock); |