diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-09-09 13:10:38 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 14:03:47 -0700 |
commit | 8254798199332966e2ab647380c990193af7e854 (patch) | |
tree | ad4a9721a872fbdec0be107f35684864a1a94053 /fs/fuse/dir.c | |
parent | b36c31ba95f0fe0a03c727300d9c4c54438a5636 (diff) | |
download | op-kernel-dev-8254798199332966e2ab647380c990193af7e854.zip op-kernel-dev-8254798199332966e2ab647380c990193af7e854.tar.gz |
[PATCH] FUSE: add fsync operation for directories
This patch adds a new FSYNCDIR request, which is sent when fsync is called
on directories. This operation is available in libfuse 2.3-pre1 or
greater.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 9b43fd4..73792d6 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -617,6 +617,12 @@ static int fuse_dir_release(struct inode *inode, struct file *file) return fuse_release_common(inode, file, 1); } +static int fuse_dir_fsync(struct file *file, struct dentry *de, int datasync) +{ + /* nfsd can call this with no file */ + return file ? fuse_fsync_common(file, de, datasync, 1) : 0; +} + static unsigned iattr_to_fattr(struct iattr *iattr, struct fuse_attr *fattr) { unsigned ivalid = iattr->ia_valid; @@ -934,6 +940,7 @@ static struct file_operations fuse_dir_operations = { .readdir = fuse_readdir, .open = fuse_dir_open, .release = fuse_dir_release, + .fsync = fuse_dir_fsync, }; static struct inode_operations fuse_common_inode_operations = { |