fuse: rework fuse_retrieve()
authorMaxim Patlasov <mpatlasov@parallels.com>
Fri, 26 Oct 2012 15:48:42 +0000 (19:48 +0400)
committerMiklos Szeredi <mszeredi@suse.cz>
Thu, 24 Jan 2013 15:21:26 +0000 (16:21 +0100)
The patch reworks fuse_retrieve() to allocate only so many page pointers
as needed. The core part of the patch is the following calculation:

num_pages = (num + offset + PAGE_SIZE - 1) >> PAGE_SHIFT;

(thanks Miklos for formula). All other changes are mostly shuffling lines.

Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>

No differences found