X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmtd%2Fubi%2Fcdev.c;fp=drivers%2Fmtd%2Fubi%2Fcdev.c;h=f8e0f68f218634cfc98747cd748183e652116027;hb=ed2a95f3ce60fe24fea59633d19e8f6d993ec4ea;hp=e63c8fc3df3a08c9faeca3357f3e94e0ef0760dd;hpb=24449b49ec00d239c737dd93e76b198d5c0f9312;p=linux-2.6-omap-h63xx.git diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index e63c8fc3df3..f8e0f68f218 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c @@ -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) { @@ -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, };