Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308610
b: refs/heads/master
c: 46058d4
h: refs/heads/master
v: v3
  • Loading branch information
Bryan Schumaker authored and Trond Myklebust committed May 15, 2012
1 parent c9fdc9e commit e6bd41f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d72c727cd9de490f936a41634e34cd4a61ba6dd6
refs/heads/master: 46058d46d3fcf2900f18d9bd5585c8f89d59e1c4
16 changes: 7 additions & 9 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2468,7 +2468,6 @@ static struct dentry *nfs_fs_mount_common(struct file_system_type *fs_type,
static struct dentry *nfs_fs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *raw_data)
{
struct nfs_parsed_mount_data *data = NULL;
struct nfs_mount_info mount_info = {
.fill_super = nfs_fill_super,
.set_security = nfs_set_sb_security,
Expand All @@ -2477,30 +2476,29 @@ static struct dentry *nfs_fs_mount(struct file_system_type *fs_type,
struct dentry *mntroot = ERR_PTR(-ENOMEM);
int error;

data = nfs_alloc_parsed_mount_data();
mount_info.parsed = nfs_alloc_parsed_mount_data();
mntfh = nfs_alloc_fhandle();
if (data == NULL || mntfh == NULL)
if (mount_info.parsed == NULL || mntfh == NULL)
goto out;

/* Validate the mount data */
error = nfs_validate_mount_data(fs_type, raw_data, data, mntfh, dev_name);
error = nfs_validate_mount_data(fs_type, raw_data, mount_info.parsed, mntfh, dev_name);
if (error == NFS_TEXT_DATA)
error = nfs_validate_text_mount_data(raw_data, data, dev_name);
error = nfs_validate_text_mount_data(raw_data, mount_info.parsed, dev_name);
if (error < 0) {
mntroot = ERR_PTR(error);
goto out;
}
mount_info.parsed = data;

#ifdef CONFIG_NFS_V4
if (data->version == 4)
mntroot = nfs4_try_mount(flags, dev_name, data);
if (mount_info.parsed->version == 4)
mntroot = nfs4_try_mount(flags, dev_name, mount_info.parsed);
else
#endif /* CONFIG_NFS_V4 */
mntroot = nfs_try_mount(flags, dev_name, mntfh, &mount_info);

out:
nfs_free_parsed_mount_data(data);
nfs_free_parsed_mount_data(mount_info.parsed);
nfs_free_fhandle(mntfh);
return mntroot;
}
Expand Down

0 comments on commit e6bd41f

Please sign in to comment.