|
@@ -703,7 +703,6 @@ static struct dentry *fat_fh_to_dentry(struct super_block *sb,
|
|
struct fid *fid, int fh_len, int fh_type)
|
|
struct fid *fid, int fh_len, int fh_type)
|
|
{
|
|
{
|
|
struct inode *inode = NULL;
|
|
struct inode *inode = NULL;
|
|
- struct dentry *result;
|
|
|
|
u32 *fh = fid->raw;
|
|
u32 *fh = fid->raw;
|
|
|
|
|
|
if (fh_len < 5 || fh_type != 3)
|
|
if (fh_len < 5 || fh_type != 3)
|
|
@@ -748,10 +747,7 @@ static struct dentry *fat_fh_to_dentry(struct super_block *sb,
|
|
* the fat_iget lookup again. If that fails, then we are totally out
|
|
* the fat_iget lookup again. If that fails, then we are totally out
|
|
* of luck. But all that is for another day
|
|
* of luck. But all that is for another day
|
|
*/
|
|
*/
|
|
- result = d_obtain_alias(inode);
|
|
|
|
- if (!IS_ERR(result))
|
|
|
|
- d_set_d_op(result, sb->s_root->d_op);
|
|
|
|
- return result;
|
|
|
|
|
|
+ return d_obtain_alias(inode);
|
|
}
|
|
}
|
|
|
|
|
|
static int
|
|
static int
|
|
@@ -799,8 +795,6 @@ static struct dentry *fat_get_parent(struct dentry *child)
|
|
brelse(bh);
|
|
brelse(bh);
|
|
|
|
|
|
parent = d_obtain_alias(inode);
|
|
parent = d_obtain_alias(inode);
|
|
- if (!IS_ERR(parent))
|
|
|
|
- d_set_d_op(parent, sb->s_root->d_op);
|
|
|
|
out:
|
|
out:
|
|
unlock_super(sb);
|
|
unlock_super(sb);
|
|
|
|
|
|
@@ -1244,7 +1238,8 @@ static int fat_read_root(struct inode *inode)
|
|
* Read the super block of an MS-DOS FS.
|
|
* Read the super block of an MS-DOS FS.
|
|
*/
|
|
*/
|
|
int fat_fill_super(struct super_block *sb, void *data, int silent,
|
|
int fat_fill_super(struct super_block *sb, void *data, int silent,
|
|
- const struct inode_operations *fs_dir_inode_ops, int isvfat)
|
|
|
|
|
|
+ const struct inode_operations *fs_dir_inode_ops, int isvfat,
|
|
|
|
+ void (*setup)(struct super_block *))
|
|
{
|
|
{
|
|
struct inode *root_inode = NULL, *fat_inode = NULL;
|
|
struct inode *root_inode = NULL, *fat_inode = NULL;
|
|
struct buffer_head *bh;
|
|
struct buffer_head *bh;
|
|
@@ -1280,6 +1275,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
|
|
if (error)
|
|
if (error)
|
|
goto out_fail;
|
|
goto out_fail;
|
|
|
|
|
|
|
|
+ setup(sb); /* flavour-specific stuff that needs options */
|
|
|
|
+
|
|
error = -EIO;
|
|
error = -EIO;
|
|
sb_min_blocksize(sb, 512);
|
|
sb_min_blocksize(sb, 512);
|
|
bh = sb_bread(sb, 0);
|
|
bh = sb_bread(sb, 0);
|