diff options
Diffstat (limited to 'fs/fat/inode.c')
-rw-r--r-- | fs/fat/inode.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 206351af7c5..86753fe10bd 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -703,7 +703,6 @@ static struct dentry *fat_fh_to_dentry(struct super_block *sb, | |||
703 | struct fid *fid, int fh_len, int fh_type) | 703 | struct fid *fid, int fh_len, int fh_type) |
704 | { | 704 | { |
705 | struct inode *inode = NULL; | 705 | struct inode *inode = NULL; |
706 | struct dentry *result; | ||
707 | u32 *fh = fid->raw; | 706 | u32 *fh = fid->raw; |
708 | 707 | ||
709 | if (fh_len < 5 || fh_type != 3) | 708 | if (fh_len < 5 || fh_type != 3) |
@@ -748,10 +747,7 @@ static struct dentry *fat_fh_to_dentry(struct super_block *sb, | |||
748 | * the fat_iget lookup again. If that fails, then we are totally out | 747 | * the fat_iget lookup again. If that fails, then we are totally out |
749 | * of luck. But all that is for another day | 748 | * of luck. But all that is for another day |
750 | */ | 749 | */ |
751 | result = d_obtain_alias(inode); | 750 | return d_obtain_alias(inode); |
752 | if (!IS_ERR(result)) | ||
753 | d_set_d_op(result, sb->s_root->d_op); | ||
754 | return result; | ||
755 | } | 751 | } |
756 | 752 | ||
757 | static int | 753 | static int |
@@ -799,8 +795,6 @@ static struct dentry *fat_get_parent(struct dentry *child) | |||
799 | brelse(bh); | 795 | brelse(bh); |
800 | 796 | ||
801 | parent = d_obtain_alias(inode); | 797 | parent = d_obtain_alias(inode); |
802 | if (!IS_ERR(parent)) | ||
803 | d_set_d_op(parent, sb->s_root->d_op); | ||
804 | out: | 798 | out: |
805 | unlock_super(sb); | 799 | unlock_super(sb); |
806 | 800 | ||
@@ -1244,7 +1238,8 @@ static int fat_read_root(struct inode *inode) | |||
1244 | * Read the super block of an MS-DOS FS. | 1238 | * Read the super block of an MS-DOS FS. |
1245 | */ | 1239 | */ |
1246 | int fat_fill_super(struct super_block *sb, void *data, int silent, | 1240 | int fat_fill_super(struct super_block *sb, void *data, int silent, |
1247 | const struct inode_operations *fs_dir_inode_ops, int isvfat) | 1241 | const struct inode_operations *fs_dir_inode_ops, int isvfat, |
1242 | void (*setup)(struct super_block *)) | ||
1248 | { | 1243 | { |
1249 | struct inode *root_inode = NULL, *fat_inode = NULL; | 1244 | struct inode *root_inode = NULL, *fat_inode = NULL; |
1250 | struct buffer_head *bh; | 1245 | struct buffer_head *bh; |
@@ -1280,6 +1275,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, | |||
1280 | if (error) | 1275 | if (error) |
1281 | goto out_fail; | 1276 | goto out_fail; |
1282 | 1277 | ||
1278 | setup(sb); /* flavour-specific stuff that needs options */ | ||
1279 | |||
1283 | error = -EIO; | 1280 | error = -EIO; |
1284 | sb_min_blocksize(sb, 512); | 1281 | sb_min_blocksize(sb, 512); |
1285 | bh = sb_bread(sb, 0); | 1282 | bh = sb_bread(sb, 0); |