/*
 * JFFS2 -- Journalling Flash File System, Version 2.
 *
 * Copyright (C) 2001-2003 Red Hat, Inc.
 *
 * Created by David Woodhouse <dwmw2@infradead.org>
 *
 * For licensing information, see the file 'LICENCE' in this directory.
 *
 * $Id: ioctl.c 1824 2005-05-10 07:30:07Z hg $
 *
 */

#include <linux/fs.h>
#include <linux/jffs2.h>
#include "os-linux.h"
#include "nodelist.h"

int jffs2_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, 
		unsigned long arg)
{
	/* Later, this will provide for lsattr.jffs2 and chattr.jffs2, which
	   will include compression support etc. */

	if (JFFS2_FLUSH_WBUF == cmd) {
		struct jffs2_sb_info *c = JFFS2_SB_INFO(inode->i_sb);
		down(&c->alloc_sem);
		jffs2_flush_wbuf_pad(c);
		up(&c->alloc_sem);
		return 0;
	}
	
	return -ENOTTY;
}
	
