fuse: req state use flags

Use flags for representing the state in fuse_req.  This is needed since
req->list will be protected by different locks in different states, hence
we'll want the state itself to be split into distinct bits, each protected
with the relevant lock in that state.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index d0c23d0..64835cf 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1743,7 +1743,7 @@
 		}
 	}
 
-	if (old_req->num_pages == 1 && old_req->state == FUSE_REQ_PENDING) {
+	if (old_req->num_pages == 1 && test_bit(FR_PENDING, &old_req->flags)) {
 		struct backing_dev_info *bdi = inode_to_bdi(page->mapping->host);
 
 		copy_highpage(old_req->pages[0], page);