[PATCH 1/2] MTD: add fsync capability

Artem Bityutskiy dedekind at infradead.org
Fri Feb 6 02:34:43 EST 2009


On Thu, 2009-02-05 at 17:00 -0500, Mike Frysinger wrote:
> 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

The patch looks fine for me, except of the weird end comment, and
the ancient ugly "DEBUG(MTD_DEBUG_LEVEL0, "MTD_fsync\n");" ...

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list