From: Miklos Szeredi Date: Tue, 6 Jan 2015 09:45:35 +0000 (+0100) Subject: fuse: fix LOOKUP vs INIT compat handling X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~274^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21f621741a770c119e7529a3f5c0e6b7c91383a3;p=pandora-kernel.git fuse: fix LOOKUP vs INIT compat handling Analysis from Marc: "Commit 7078187a795f ("fuse: introduce fuse_simple_request() helper") from the above pull request triggers some EIO errors for me in some tests that rely on fuse Looking at the code changes and a bit of debugging info I think there's a general problem here that fuse_get_req checks and possibly waits for fc->initialized, and this was always called first. But this commit changes the ordering and in many places fc->minor is now possibly used before fuse_get_req, and we can't be sure that fc has been initialized. In my case fuse_lookup_init sets req->out.args[0].size to the wrong size because fc->minor at that point is still 0, leading to the EIO error." Fix by moving the compat adjustments into fuse_simple_request() to after fuse_get_req(). This is also more readable than the original, since now compatibility is handled in a single function instead of cluttering each operation. Reported-by: Marc Dionne Tested-by: Marc Dionne Signed-off-by: Miklos Szeredi Fixes: 7078187a795f ("fuse: introduce fuse_simple_request() helper") --- Reading git-diff-tree failed