]> sourceware.org Git - lvm2.git/commitdiff
o Get file size correct for table
authorSteven Whitehouse <swhiteho@fedoraproject.org>
Tue, 16 Oct 2001 12:17:54 +0000 (12:17 +0000)
committerSteven Whitehouse <swhiteho@fedoraproject.org>
Tue, 16 Oct 2001 12:17:54 +0000 (12:17 +0000)
 o Make parser look at the right object

driver/device-mapper/dmfs-table.c

index 9a26ab1eef29889d2d8254f13bf954ee4be1d058..ed7b40bf72b0e8789263c60cf4a227f3c31bd9ee 100644 (file)
@@ -216,7 +216,7 @@ static int dmfs_table_release(struct inode *inode, struct file *f)
        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)
@@ -311,6 +311,15 @@ static int dmfs_table_sync(struct file *file, struct dentry *dentry, int datasyn
        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,
@@ -328,6 +337,7 @@ static struct file_operations dmfs_table_file_operations = {
 };
 
 static struct inode_operations dmfs_table_inode_operations = {
+       revalidate:     dmfs_table_revalidate,
 };
 
 struct inode *dmfs_create_table(struct inode *dir, int mode)
This page took 0.032523 seconds and 5 git commands to generate.