Commit 58bda1da authored by Al Viro's avatar Al Viro

fuse/dev: use atomic maps

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 8ffcb32e
...@@ -669,13 +669,13 @@ static void fuse_copy_finish(struct fuse_copy_state *cs) ...@@ -669,13 +669,13 @@ static void fuse_copy_finish(struct fuse_copy_state *cs)
if (!cs->write) { if (!cs->write) {
buf->ops->unmap(cs->pipe, buf, cs->mapaddr); buf->ops->unmap(cs->pipe, buf, cs->mapaddr);
} else { } else {
kunmap(buf->page); kunmap_atomic(cs->mapaddr);
buf->len = PAGE_SIZE - cs->len; buf->len = PAGE_SIZE - cs->len;
} }
cs->currbuf = NULL; cs->currbuf = NULL;
cs->mapaddr = NULL; cs->mapaddr = NULL;
} else if (cs->mapaddr) { } else if (cs->mapaddr) {
kunmap(cs->pg); kunmap_atomic(cs->mapaddr);
if (cs->write) { if (cs->write) {
flush_dcache_page(cs->pg); flush_dcache_page(cs->pg);
set_page_dirty_lock(cs->pg); set_page_dirty_lock(cs->pg);
...@@ -706,7 +706,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs) ...@@ -706,7 +706,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
BUG_ON(!cs->nr_segs); BUG_ON(!cs->nr_segs);
cs->currbuf = buf; cs->currbuf = buf;
cs->mapaddr = buf->ops->map(cs->pipe, buf, 0); cs->mapaddr = buf->ops->map(cs->pipe, buf, 1);
cs->len = buf->len; cs->len = buf->len;
cs->buf = cs->mapaddr + buf->offset; cs->buf = cs->mapaddr + buf->offset;
cs->pipebufs++; cs->pipebufs++;
...@@ -726,7 +726,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs) ...@@ -726,7 +726,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
buf->len = 0; buf->len = 0;
cs->currbuf = buf; cs->currbuf = buf;
cs->mapaddr = kmap(page); cs->mapaddr = kmap_atomic(page);
cs->buf = cs->mapaddr; cs->buf = cs->mapaddr;
cs->len = PAGE_SIZE; cs->len = PAGE_SIZE;
cs->pipebufs++; cs->pipebufs++;
...@@ -745,7 +745,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs) ...@@ -745,7 +745,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs)
return err; return err;
BUG_ON(err != 1); BUG_ON(err != 1);
offset = cs->addr % PAGE_SIZE; offset = cs->addr % PAGE_SIZE;
cs->mapaddr = kmap(cs->pg); cs->mapaddr = kmap_atomic(cs->pg);
cs->buf = cs->mapaddr + offset; cs->buf = cs->mapaddr + offset;
cs->len = min(PAGE_SIZE - offset, cs->seglen); cs->len = min(PAGE_SIZE - offset, cs->seglen);
cs->seglen -= cs->len; cs->seglen -= cs->len;
......
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