Skip to content

Commit eb29d66

Browse files
Christoph HellwigChristoph Hellwig
authored andcommitted
hfsplus: write up fsync for directories
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>
1 parent 2814697 commit eb29d66

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎fs/hfsplus/dir.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ const struct inode_operations hfsplus_dir_inode_operations = {
485485
};
486486

487487
const struct file_operations hfsplus_dir_operations = {
488+
.fsync = hfsplus_file_fsync,
488489
.read = generic_read_dir,
489490
.readdir = hfsplus_readdir,
490491
.unlocked_ioctl = hfsplus_ioctl,

‎fs/hfsplus/hfsplus_fs.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ int hfsplus_cat_read_inode(struct inode *, struct hfs_find_data *);
352352
int hfsplus_cat_write_inode(struct inode *);
353353
struct inode *hfsplus_new_inode(struct super_block *, int);
354354
void hfsplus_delete_inode(struct inode *);
355+
int hfsplus_file_fsync(struct file *file, int datasync);
355356

356357
/* ioctl.c */
357358
long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);

‎fs/hfsplus/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr)
302302
return 0;
303303
}
304304

305-
static int hfsplus_file_fsync(struct file *file, int datasync)
305+
int hfsplus_file_fsync(struct file *file, int datasync)
306306
{
307307
struct inode *inode = file->f_mapping->host;
308308
struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb);

0 commit comments

Comments
 (0)