2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 01:34:00 +08:00

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>
This commit is contained in:
Miklos Szeredi 2010-10-26 14:22:27 -07:00 committed by Linus Torvalds
parent 3ecb01df32
commit b6777c40c7

View File

@ -809,11 +809,9 @@ static int fuse_copy_page(struct fuse_copy_state *cs, struct page **pagep,
int err; int err;
struct page *page = *pagep; struct page *page = *pagep;
if (page && zeroing && count < PAGE_SIZE) { if (page && zeroing && count < PAGE_SIZE)
void *mapaddr = kmap_atomic(page, KM_USER1); clear_highpage(page);
clear_page(mapaddr);
kunmap_atomic(mapaddr, KM_USER1);
}
while (count) { while (count) {
if (cs->write && cs->pipebufs && page) { if (cs->write && cs->pipebufs && page) {
return fuse_ref_page(cs, page, offset, count); 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,
} }
} }
if (page) { if (page) {
void *mapaddr = kmap_atomic(page, KM_USER1); void *mapaddr = kmap_atomic(page, KM_USER0);
void *buf = mapaddr + offset; void *buf = mapaddr + offset;
offset += fuse_copy_do(cs, &buf, &count); offset += fuse_copy_do(cs, &buf, &count);
kunmap_atomic(mapaddr, KM_USER1); kunmap_atomic(mapaddr, KM_USER0);
} else } else
offset += fuse_copy_do(cs, NULL, &count); offset += fuse_copy_do(cs, NULL, &count);
} }