hfsplus: write up fsync for directories
authorChristoph Hellwig <hch@tuxera.com>
Tue, 23 Nov 2010 13:38:10 +0000 (14:38 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 23 Nov 2010 13:38:10 +0000 (14:38 +0100)
fsync is supposed to not just work on regular files, but also on
directories.  Fortunately enough hfsplus_file_fsync works just fine
for directories, so we can just wire it up.

Signed-off-by: Christoph Hellwig <hch@tuxera.com>
fs/hfsplus/dir.c
fs/hfsplus/hfsplus_fs.h
fs/hfsplus/inode.c

index 9d59c0571f5982f27e3d36d12ea6fae81f3b02c2..e44c78a837e8ced0183f43e4002ffb84ecfca4c4 100644 (file)
@@ -485,6 +485,7 @@ const struct inode_operations hfsplus_dir_inode_operations = {
 };
 
 const struct file_operations hfsplus_dir_operations = {
+       .fsync          = hfsplus_file_fsync,
        .read           = generic_read_dir,
        .readdir        = hfsplus_readdir,
        .unlocked_ioctl = hfsplus_ioctl,
index 0d8532d966943b04740a516dff5d700d36646f5f..625549579e9ea430eed35aaefc396e80bf2f0536 100644 (file)
@@ -352,6 +352,7 @@ int hfsplus_cat_read_inode(struct inode *, struct hfs_find_data *);
 int hfsplus_cat_write_inode(struct inode *);
 struct inode *hfsplus_new_inode(struct super_block *, int);
 void hfsplus_delete_inode(struct inode *);
+int hfsplus_file_fsync(struct file *file, int datasync);
 
 /* ioctl.c */
 long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
index be68961da9977b3326ae8162a2db591a6244199d..8cd8dc2e7fdd87fbea5845c441876dd3e481c1ba 100644 (file)
@@ -302,7 +302,7 @@ static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr)
        return 0;
 }
 
-static int hfsplus_file_fsync(struct file *file, int datasync)
+int hfsplus_file_fsync(struct file *file, int datasync)
 {
        struct inode *inode = file->f_mapping->host;
        struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb);