]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
commit4d53dc99baf139e4fa0d395f7658032cc2eb3297
tree4709fcfd8631d744abc95195a257b67000e863fa
parentb111c8c0e3e5e780ae0758fc4c1c376a7c9d5997
fuse: rework fuse_retrieve()

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>
fs/fuse/dev.c