Commit 48bf5231 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller

net/smc: remove local variable page in smc_rx_splice()

The page map address is already stored in the RMB descriptor.
There is no need to derive it from the cpu_addr value.
Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 144ce4b9
...@@ -155,10 +155,8 @@ static int smc_rx_splice(struct pipe_inode_info *pipe, char *src, size_t len, ...@@ -155,10 +155,8 @@ static int smc_rx_splice(struct pipe_inode_info *pipe, char *src, size_t len,
struct splice_pipe_desc spd; struct splice_pipe_desc spd;
struct partial_page partial; struct partial_page partial;
struct smc_spd_priv *priv; struct smc_spd_priv *priv;
struct page *page;
int bytes; int bytes;
page = virt_to_page(smc->conn.rmb_desc->cpu_addr);
priv = kzalloc(sizeof(*priv), GFP_KERNEL); priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) if (!priv)
return -ENOMEM; return -ENOMEM;
...@@ -170,7 +168,7 @@ static int smc_rx_splice(struct pipe_inode_info *pipe, char *src, size_t len, ...@@ -170,7 +168,7 @@ static int smc_rx_splice(struct pipe_inode_info *pipe, char *src, size_t len,
spd.nr_pages_max = 1; spd.nr_pages_max = 1;
spd.nr_pages = 1; spd.nr_pages = 1;
spd.pages = &page; spd.pages = &smc->conn.rmb_desc->pages;
spd.partial = &partial; spd.partial = &partial;
spd.ops = &smc_pipe_ops; spd.ops = &smc_pipe_ops;
spd.spd_release = smc_rx_spd_release; spd.spd_release = smc_rx_spd_release;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment