diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-02-02 21:03:40 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-01 23:19:18 -0400 |
commit | 58bda1da4b3c3ec6da8d0badaba12ce02839a241 (patch) | |
tree | 0b58f67956c31ae6971374c0e4d43b61b2f0e237 /fs/fuse | |
parent | 8ffcb32e05239f0e53abfb0a1bc4eee4855b7fd2 (diff) |
fuse/dev: use atomic maps
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 0a648bb455ae..f90af6fe6884 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -669,13 +669,13 @@ static void fuse_copy_finish(struct fuse_copy_state *cs) | |||
669 | if (!cs->write) { | 669 | if (!cs->write) { |
670 | buf->ops->unmap(cs->pipe, buf, cs->mapaddr); | 670 | buf->ops->unmap(cs->pipe, buf, cs->mapaddr); |
671 | } else { | 671 | } else { |
672 | kunmap(buf->page); | 672 | kunmap_atomic(cs->mapaddr); |
673 | buf->len = PAGE_SIZE - cs->len; | 673 | buf->len = PAGE_SIZE - cs->len; |
674 | } | 674 | } |
675 | cs->currbuf = NULL; | 675 | cs->currbuf = NULL; |
676 | cs->mapaddr = NULL; | 676 | cs->mapaddr = NULL; |
677 | } else if (cs->mapaddr) { | 677 | } else if (cs->mapaddr) { |
678 | kunmap(cs->pg); | 678 | kunmap_atomic(cs->mapaddr); |
679 | if (cs->write) { | 679 | if (cs->write) { |
680 | flush_dcache_page(cs->pg); | 680 | flush_dcache_page(cs->pg); |
681 | set_page_dirty_lock(cs->pg); | 681 | set_page_dirty_lock(cs->pg); |
@@ -706,7 +706,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs) | |||
706 | 706 | ||
707 | BUG_ON(!cs->nr_segs); | 707 | BUG_ON(!cs->nr_segs); |
708 | cs->currbuf = buf; | 708 | cs->currbuf = buf; |
709 | cs->mapaddr = buf->ops->map(cs->pipe, buf, 0); | 709 | cs->mapaddr = buf->ops->map(cs->pipe, buf, 1); |
710 | cs->len = buf->len; | 710 | cs->len = buf->len; |
711 | cs->buf = cs->mapaddr + buf->offset; | 711 | cs->buf = cs->mapaddr + buf->offset; |
712 | cs->pipebufs++; | 712 | cs->pipebufs++; |
@@ -726,7 +726,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs) | |||
726 | buf->len = 0; | 726 | buf->len = 0; |
727 | 727 | ||
728 | cs->currbuf = buf; | 728 | cs->currbuf = buf; |
729 | cs->mapaddr = kmap(page); | 729 | cs->mapaddr = kmap_atomic(page); |
730 | cs->buf = cs->mapaddr; | 730 | cs->buf = cs->mapaddr; |
731 | cs->len = PAGE_SIZE; | 731 | cs->len = PAGE_SIZE; |
732 | cs->pipebufs++; | 732 | cs->pipebufs++; |
@@ -745,7 +745,7 @@ static int fuse_copy_fill(struct fuse_copy_state *cs) | |||
745 | return err; | 745 | return err; |
746 | BUG_ON(err != 1); | 746 | BUG_ON(err != 1); |
747 | offset = cs->addr % PAGE_SIZE; | 747 | offset = cs->addr % PAGE_SIZE; |
748 | cs->mapaddr = kmap(cs->pg); | 748 | cs->mapaddr = kmap_atomic(cs->pg); |
749 | cs->buf = cs->mapaddr + offset; | 749 | cs->buf = cs->mapaddr + offset; |
750 | cs->len = min(PAGE_SIZE - offset, cs->seglen); | 750 | cs->len = min(PAGE_SIZE - offset, cs->seglen); |
751 | cs->seglen -= cs->len; | 751 | cs->seglen -= cs->len; |