Re: [PATCH V2 1/2] FS: Add generic data flush to fsync

From: hch
Date: Mon Apr 28 2014 - 07:49:36 EST


> + if (flush == true) {
> + err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL,
> + NULL);
> + if (ret == 0)
> + ret = err;
> + }
> +
> out:
> mutex_unlock(&inode->i_mutex);

There is no need to have the cache flush under i_mutex, and thus there's
also no need to have the parameter, as the flush can be done in
generic_file_fsync.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/