Merge git://git.infradead.org/mtd-2.6
[powerpc.git] / fs / fat / file.c
index 8337451..55d3c74 100644 (file)
@@ -92,7 +92,7 @@ int fat_generic_ioctl(struct inode *inode, struct file *filp,
                }
 
                /* This MUST be done before doing anything irreversible... */
-               err = notify_change(filp->f_dentry, &ia);
+               err = notify_change(filp->f_path.dentry, &ia);
                if (err)
                        goto up;
 
@@ -303,7 +303,17 @@ void fat_truncate(struct inode *inode)
        fat_flush_inodes(inode->i_sb, inode, NULL);
 }
 
-struct inode_operations fat_file_inode_operations = {
+int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
+{
+       struct inode *inode = dentry->d_inode;
+       generic_fillattr(inode, stat);
+       stat->blksize = MSDOS_SB(inode->i_sb)->cluster_size;
+       return 0;
+}
+EXPORT_SYMBOL_GPL(fat_getattr);
+
+const struct inode_operations fat_file_inode_operations = {
        .truncate       = fat_truncate,
        .setattr        = fat_notify_change,
+       .getattr        = fat_getattr,
 };