Skip to content

Commit

Permalink
squashfs: remove the second argument of k[un]map_atomic()
Browse files Browse the repository at this point in the history
Signed-off-by: Cong Wang <[email protected]>
  • Loading branch information
Cong Wang authored and congwang committed Mar 20, 2012
1 parent 883da60 commit 53b55e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions fs/squashfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,10 @@ static int squashfs_readpage(struct file *file, struct page *page)
if (PageUptodate(push_page))
goto skip_page;

pageaddr = kmap_atomic(push_page, KM_USER0);
pageaddr = kmap_atomic(push_page);
squashfs_copy_data(pageaddr, buffer, offset, avail);
memset(pageaddr + avail, 0, PAGE_CACHE_SIZE - avail);
kunmap_atomic(pageaddr, KM_USER0);
kunmap_atomic(pageaddr);
flush_dcache_page(push_page);
SetPageUptodate(push_page);
skip_page:
Expand All @@ -484,9 +484,9 @@ static int squashfs_readpage(struct file *file, struct page *page)
error_out:
SetPageError(page);
out:
pageaddr = kmap_atomic(page, KM_USER0);
pageaddr = kmap_atomic(page);
memset(pageaddr, 0, PAGE_CACHE_SIZE);
kunmap_atomic(pageaddr, KM_USER0);
kunmap_atomic(pageaddr);
flush_dcache_page(page);
if (!PageError(page))
SetPageUptodate(page);
Expand Down
4 changes: 2 additions & 2 deletions fs/squashfs/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ static int squashfs_symlink_readpage(struct file *file, struct page *page)
goto error_out;
}

pageaddr = kmap_atomic(page, KM_USER0);
pageaddr = kmap_atomic(page);
copied = squashfs_copy_data(pageaddr + bytes, entry, offset,
length - bytes);
if (copied == length - bytes)
memset(pageaddr + length, 0, PAGE_CACHE_SIZE - length);
else
block = entry->next_index;
kunmap_atomic(pageaddr, KM_USER0);
kunmap_atomic(pageaddr);
squashfs_cache_put(entry);
}

Expand Down

0 comments on commit 53b55e5

Please sign in to comment.