]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fuse: categorize fuse_get_req()
authorMaxim Patlasov <mpatlasov@parallels.com>
Fri, 26 Oct 2012 15:48:30 +0000 (19:48 +0400)
committerMiklos Szeredi <mszeredi@suse.cz>
Tue, 6 Nov 2012 12:09:35 +0000 (13:09 +0100)
commitfbc8f1ecb5c412ab18bc7820a7e44f428c95943f
tree791d07c1f88667b92703d0a875b50c33fa15c85b
parente0b40a9c60612ddd561e30def1da60f1dc48996d
fuse: categorize fuse_get_req()

The patch categorizes all fuse_get_req() invocations into two categories:
 - fuse_get_req_nopages(fc) - when caller doesn't care about req->pages
 - fuse_get_req(fc, n) - when caller need n page pointers (n > 0)

Adding fuse_get_req_nopages() helps to avoid numerous fuse_get_req(fc, 0)
scattered over code. Now it's clear from the first glance when a caller need
fuse_req with page pointers.

The patch doesn't make any logic changes. In multi-page case, it silly
allocates array of FUSE_MAX_PAGES_PER_REQ page pointers. This will be amended
by future patches.

Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/cuse.c
fs/fuse/dev.c
fs/fuse/dir.c
fs/fuse/file.c
fs/fuse/fuse_i.h
fs/fuse/inode.c