fuse: add reference counting to fuse_file
commitc756e0a4d79202535774806f148026e40466a5eb
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 17 Oct 2007 06:31:00 +0000 (16 23:31 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:43:03 +0000 (17 08:43 -0700)
treeaa769ecfe2204e2e1969108d2c391b88b95e983b
parentde5e3dec421c44c999071b8f7e0580ad2ade92ae
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>
fs/fuse/dev.c
fs/fuse/dir.c
fs/fuse/file.c
fs/fuse/fuse_i.h