fuse: introduce fuse_simple_request() helper
authorMiklos Szeredi <mszeredi@suse.cz>
Fri, 12 Dec 2014 08:49:05 +0000 (09:49 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Fri, 12 Dec 2014 08:49:05 +0000 (09:49 +0100)
commit7078187a795f862465325bcadf3070867c0cb5f8
tree1ea2a3c04a18b9c00909c7ebcef925b96f9a7f80
parentf704dcb538eb80b7f5b26281a79b8e29a8e24d62
fuse: introduce fuse_simple_request() helper

The following pattern is repeated many times:

req = fuse_get_req_nopages(fc);
/* Initialize req->(in|out).args */
fuse_request_send(fc, req);
err = req->out.h.error;
fuse_put_request(req);

Create a new replacement helper:

/* Initialize args */
err = fuse_simple_request(fc, &args);

In addition to reducing the code size, this will ease moving from the
complex arg-based to a simpler page-based I/O on the fuse device.

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