aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fat/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fat/inode.c')
-rw-r--r--fs/fat/inode.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 920a576e1c25..53f3cf62b7c1 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -634,8 +634,6 @@ static const struct super_operations fat_sops = {
634 .clear_inode = fat_clear_inode, 634 .clear_inode = fat_clear_inode,
635 .remount_fs = fat_remount, 635 .remount_fs = fat_remount,
636 636
637 .read_inode = make_bad_inode,
638
639 .show_options = fat_show_options, 637 .show_options = fat_show_options,
640}; 638};
641 639
@@ -663,8 +661,8 @@ static struct dentry *fat_fh_to_dentry(struct super_block *sb,
663 if (fh_len < 5 || fh_type != 3) 661 if (fh_len < 5 || fh_type != 3)
664 return NULL; 662 return NULL;
665 663
666 inode = iget(sb, fh[0]); 664 inode = ilookup(sb, fh[0]);
667 if (!inode || is_bad_inode(inode) || inode->i_generation != fh[1]) { 665 if (!inode || inode->i_generation != fh[1]) {
668 if (inode) 666 if (inode)
669 iput(inode); 667 iput(inode);
670 inode = NULL; 668 inode = NULL;
@@ -760,7 +758,7 @@ static struct dentry *fat_get_parent(struct dentry *child)
760 inode = fat_build_inode(child->d_sb, de, i_pos); 758 inode = fat_build_inode(child->d_sb, de, i_pos);
761 brelse(bh); 759 brelse(bh);
762 if (IS_ERR(inode)) { 760 if (IS_ERR(inode)) {
763 parent = ERR_PTR(PTR_ERR(inode)); 761 parent = ERR_CAST(inode);
764 goto out; 762 goto out;
765 } 763 }
766 parent = d_alloc_anon(inode); 764 parent = d_alloc_anon(inode);
@@ -839,6 +837,8 @@ static int fat_show_options(struct seq_file *m, struct vfsmount *mnt)
839 if (!opts->numtail) 837 if (!opts->numtail)
840 seq_puts(m, ",nonumtail"); 838 seq_puts(m, ",nonumtail");
841 } 839 }
840 if (sbi->options.flush)
841 seq_puts(m, ",flush");
842 842
843 return 0; 843 return 0;
844} 844}
@@ -1295,10 +1295,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
1295 1295
1296 fsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data; 1296 fsinfo = (struct fat_boot_fsinfo *)fsinfo_bh->b_data;
1297 if (!IS_FSINFO(fsinfo)) { 1297 if (!IS_FSINFO(fsinfo)) {
1298 printk(KERN_WARNING 1298 printk(KERN_WARNING "FAT: Invalid FSINFO signature: "
1299 "FAT: Did not find valid FSINFO signature.\n" 1299 "0x%08x, 0x%08x (sector = %lu)\n",
1300 " Found signature1 0x%08x signature2 0x%08x"
1301 " (sector = %lu)\n",
1302 le32_to_cpu(fsinfo->signature1), 1300 le32_to_cpu(fsinfo->signature1),
1303 le32_to_cpu(fsinfo->signature2), 1301 le32_to_cpu(fsinfo->signature2),
1304 sbi->fsinfo_sector); 1302 sbi->fsinfo_sector);