Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44493
b: refs/heads/master
c: 1de2412
h: refs/heads/master
i:
  44491: 2539927
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Dec 13, 2006
1 parent cd998c7 commit 11bf896
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 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: 2154227a2c6cf04e28576b59c684123eb0e81958
refs/heads/master: 1de241268d7b6bea05d64f9269bf9aa90be49ff1
23 changes: 15 additions & 8 deletions trunk/fs/ncpfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ static int ncp_parse_options(struct ncp_mount_data_kernel *data, char *options)
char *optarg;
unsigned long optint;
int version = 0;
int ret;

data->flags = 0;
data->int_flags = 0;
Expand All @@ -343,8 +344,9 @@ static int ncp_parse_options(struct ncp_mount_data_kernel *data, char *options)
data->mounted_vol[0] = 0;

while ((optval = ncp_getopt("ncpfs", &options, ncp_opts, NULL, &optarg, &optint)) != 0) {
if (optval < 0)
return optval;
ret = optval;
if (ret < 0)
goto err;
switch (optval) {
case 'u':
data->uid = optint;
Expand Down Expand Up @@ -380,18 +382,21 @@ static int ncp_parse_options(struct ncp_mount_data_kernel *data, char *options)
data->info_fd = optint;
break;
case 'v':
if (optint < NCP_MOUNT_VERSION_V4) {
return -ECHRNG;
}
if (optint > NCP_MOUNT_VERSION_V5) {
return -ECHRNG;
}
ret = -ECHRNG;
if (optint < NCP_MOUNT_VERSION_V4)
goto err;
if (optint > NCP_MOUNT_VERSION_V5)
goto err;
version = optint;
break;

}
}
return 0;
err:
put_pid(data->wdog_pid);
data->wdog_pid = NULL;
return ret;
}

static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
Expand All @@ -409,6 +414,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
#endif
struct ncp_entry_info finfo;

data.wdog_pid = NULL;
server = kzalloc(sizeof(struct ncp_server), GFP_KERNEL);
if (!server)
return -ENOMEM;
Expand Down Expand Up @@ -679,6 +685,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
*/
fput(ncp_filp);
out:
put_pid(data.wdog_pid);
sb->s_fs_info = NULL;
kfree(server);
return error;
Expand Down

0 comments on commit 11bf896

Please sign in to comment.