diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2007-10-17 02:31:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:43:03 -0400 |
commit | c756e0a4d79202535774806f148026e40466a5eb (patch) | |
tree | aa769ecfe2204e2e1969108d2c391b88b95e983b /fs/fuse/dev.c | |
parent | de5e3dec421c44c999071b8f7e0580ad2ade92ae (diff) |
fuse: add reference counting to fuse_file
Make lifetime of 'struct fuse_file' independent from 'struct file' by adding a
reference counter and destructor.
This will enable asynchronous page writeback, where it cannot be guaranteed,
that the file is not released while a request with this file handle is being
served.
The actual RELEASE request is only sent when there are no more references to
the fuse_file.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 9c9e35e42bfd..de25bff31420 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -233,8 +233,6 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req) | |||
233 | spin_unlock(&fc->lock); | 233 | spin_unlock(&fc->lock); |
234 | dput(req->dentry); | 234 | dput(req->dentry); |
235 | mntput(req->vfsmount); | 235 | mntput(req->vfsmount); |
236 | if (req->file) | ||
237 | fput(req->file); | ||
238 | wake_up(&req->waitq); | 236 | wake_up(&req->waitq); |
239 | if (end) | 237 | if (end) |
240 | end(fc, req); | 238 | end(fc, req); |