if (f->f_mode & FMODE_WRITE) {
down(&dmi->sem);
- table = dmfs_parse(inode);
+ table = dmfs_parse(dentry->d_parent->d_inode);
if (table) {
if (dmi->table)
return 0;
}
+static int dmfs_table_revalidate(struct dentry *dentry)
+{
+ struct inode *inode = dentry->d_inode;
+ struct inode *parent = dentry->d_parent->d_inode;
+
+ inode->i_size = parent->i_size;
+ return 0;
+}
+
struct address_space_operations dmfs_address_space_operations = {
readpage: dmfs_readpage,
writepage: dmfs_writepage,
};
static struct inode_operations dmfs_table_inode_operations = {
+ revalidate: dmfs_table_revalidate,
};
struct inode *dmfs_create_table(struct inode *dir, int mode)