Skip to content

Commit

Permalink
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6
Browse files Browse the repository at this point in the history
* 'linux-next' of git://git.infradead.org/ubi-2.6:
  UBI: add fsync capability
  • Loading branch information
Linus Torvalds committed Apr 6, 2009
2 parents 432870d + 1b24bc3 commit 38d9aef
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/mtd/ubi/cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,16 @@ static loff_t vol_cdev_llseek(struct file *file, loff_t offset, int origin)
return new_offset;
}

static int vol_cdev_fsync(struct file *file, struct dentry *dentry,
int datasync)
{
struct ubi_volume_desc *desc = file->private_data;
struct ubi_device *ubi = desc->vol->ubi;

return ubi_sync(ubi->ubi_num);
}


static ssize_t vol_cdev_read(struct file *file, __user char *buf, size_t count,
loff_t *offp)
{
Expand Down Expand Up @@ -1073,6 +1083,7 @@ const struct file_operations ubi_vol_cdev_operations = {
.llseek = vol_cdev_llseek,
.read = vol_cdev_read,
.write = vol_cdev_write,
.fsync = vol_cdev_fsync,
.unlocked_ioctl = vol_cdev_ioctl,
.compat_ioctl = vol_cdev_compat_ioctl,
};
Expand Down

0 comments on commit 38d9aef

Please sign in to comment.