diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2010-10-26 17:22:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 19:52:13 -0400 |
commit | b6777c40c79168d938c30b5b7471fbd64bca109c (patch) | |
tree | 866d965ba77a47fd81b69883194ec9c7238a48d5 /fs/fuse/dev.c | |
parent | 3ecb01df3261d3b1f02ccfcf8384e2a255d2a1d0 (diff) |
fuse: use clear_highpage() and KM_USER0 instead of KM_USER1
Commit 7909b1c640 ("fuse: don't use atomic kmap") removed KM_USER0 usage
from fuse/dev.c. Switch KM_USER1 uses to KM_USER0 for clarity. Also
replace open coded clear_highpage().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 69037118b2c9..b98664275f02 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -809,11 +809,9 @@ static int fuse_copy_page(struct fuse_copy_state *cs, struct page **pagep, | |||
809 | int err; | 809 | int err; |
810 | struct page *page = *pagep; | 810 | struct page *page = *pagep; |
811 | 811 | ||
812 | if (page && zeroing && count < PAGE_SIZE) { | 812 | if (page && zeroing && count < PAGE_SIZE) |
813 | void *mapaddr = kmap_atomic(page, KM_USER1); | 813 | clear_highpage(page); |
814 | clear_page(mapaddr); | 814 | |
815 | kunmap_atomic(mapaddr, KM_USER1); | ||
816 | } | ||
817 | while (count) { | 815 | while (count) { |
818 | if (cs->write && cs->pipebufs && page) { | 816 | if (cs->write && cs->pipebufs && page) { |
819 | return fuse_ref_page(cs, page, offset, count); | 817 | return fuse_ref_page(cs, page, offset, count); |
@@ -830,10 +828,10 @@ static int fuse_copy_page(struct fuse_copy_state *cs, struct page **pagep, | |||
830 | } | 828 | } |
831 | } | 829 | } |
832 | if (page) { | 830 | if (page) { |
833 | void *mapaddr = kmap_atomic(page, KM_USER1); | 831 | void *mapaddr = kmap_atomic(page, KM_USER0); |
834 | void *buf = mapaddr + offset; | 832 | void *buf = mapaddr + offset; |
835 | offset += fuse_copy_do(cs, &buf, &count); | 833 | offset += fuse_copy_do(cs, &buf, &count); |
836 | kunmap_atomic(mapaddr, KM_USER1); | 834 | kunmap_atomic(mapaddr, KM_USER0); |
837 | } else | 835 | } else |
838 | offset += fuse_copy_do(cs, NULL, &count); | 836 | offset += fuse_copy_do(cs, NULL, &count); |
839 | } | 837 | } |