[PATCH 1/2] MTD: add fsync capability

Mike Frysinger vapier.adi at gmail.com
Thu Feb 5 17:00:28 EST 2009


On Thu, Feb 5, 2009 at 16:25, Corentin Chary wrote:
> +static int mtd_fsync(struct file *file, struct dentry *dentry, int datasync)
> +{
> +       struct mtd_file_info *mfi = file->private_data;
> +       struct mtd_info *mtd = mfi->mtd;
> +
> +       DEBUG(MTD_DEBUG_LEVEL0, "MTD_fsync\n");
> +
> +       /* Only sync if opened RW */
> +       if ((file->f_mode & FMODE_WRITE) && mtd->sync)
> +               mtd->sync(mtd);
> +
> +       return 0;
> +} /* mtd_fsync */

adding a comment to mark the end of a function isnt common ... i'd
drop that.  otherwise, the patch looks pretty straightforward to me,
but i'm not a big VFS guru ;).
-mike



More information about the linux-mtd mailing list