Skip to content

Commit

Permalink
hfsplus: write up fsync for directories
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Christoph Hellwig committed Nov 23, 2010
1 parent 2814697 commit eb29d66
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions fs/hfsplus/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions fs/hfsplus/hfsplus_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion fs/hfsplus/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eb29d66

Please sign in to comment.