Skip to content

Commit

Permalink
net/smc: remove local variable page in smc_rx_splice()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
braunu authored and davem330 committed Jul 23, 2018
1 parent 144ce4b commit 48bf523
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/smc/smc_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 48bf523

Please sign in to comment.