From 93a8c3cd9e9834dc5f5c373336f3a0065521152d Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 18 Oct 2007 03:07:03 -0700 Subject: fuse: add list of writable files to fuse_inode Each WRITE request must carry a valid file descriptor. When a page is written back from a memory mapping, the file through which the page was dirtied is not available, so a new mechananism is needed to find a suitable file in ->writepage(s). A list of fuse_files is added to fuse_inode. The file is removed from the list in fuse_release(). This patch is in preparation for writable mmap support. Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/fuse/fuse_i.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs/fuse/fuse_i.h') diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index b24fc9b386f..5657cca0d0c 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -70,6 +70,9 @@ struct fuse_inode { /** Version of last attribute change */ u64 attr_version; + + /** Files usable in writepage. Protected by fc->lock */ + struct list_head write_files; }; /** FUSE specific file data */ @@ -82,6 +85,9 @@ struct fuse_file { /** Refcount */ atomic_t count; + + /** Entry on inode's write_files list */ + struct list_head write_entry; }; /** One input argument of a request */ -- cgit v1.2.3