diff options
author | Ursula Braun <ursula.braun@de.ibm.com> | 2018-07-23 13:53:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-23 10:57:14 -0700 |
commit | 48bf5231771c7e3961c8326353b6027b1bed6eb5 (patch) | |
tree | 787942fe151b13a62bb9e6fee59eb52ee347b8ac /net/smc | |
parent | 144ce4b9b5a788953b5373162a1921267497fb38 (diff) | |
download | lwn-48bf5231771c7e3961c8326353b6027b1bed6eb5.tar.gz lwn-48bf5231771c7e3961c8326353b6027b1bed6eb5.zip |
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: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc')
-rw-r--r-- | net/smc/smc_rx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c index c99c987097b1..bbcf0fe4ae10 100644 --- a/net/smc/smc_rx.c +++ b/net/smc/smc_rx.c @@ -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 partial_page partial; struct smc_spd_priv *priv; - struct page *page; int bytes; - page = virt_to_page(smc->conn.rmb_desc->cpu_addr); priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; @@ -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 = 1; - spd.pages = &page; + spd.pages = &smc->conn.rmb_desc->pages; spd.partial = &partial; spd.ops = &smc_pipe_ops; spd.spd_release = smc_rx_spd_release; |