X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fisdn%2Fcapi%2Fcapifs.c;h=550e80f390a63f87da84f84e9ec0290f75ca7151;hb=16d69265b930f7e2fa9eea381715696f780718f4;hp=2dd1b57b0ba4959ab9578eb9de478410225e7094;hpb=b98adfccdf5f8dd34ae56a2d5adbe2c030bd4674;p=linux-2.6-omap-h63xx.git diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index 2dd1b57b0ba..550e80f390a 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c @@ -52,6 +52,7 @@ static int capifs_remount(struct super_block *s, int *flags, char *data) gid_t gid = 0; umode_t mode = 0600; char *this_char; + char *new_opt = kstrdup(data, GFP_KERNEL); this_char = NULL; while ((this_char = strsep(&data, ",")) != NULL) { @@ -68,15 +69,21 @@ static int capifs_remount(struct super_block *s, int *flags, char *data) } else if (sscanf(this_char, "mode=%o%c", &n, &dummy) == 1) mode = n & ~S_IFMT; else { + kfree(new_opt); printk("capifs: called with bogus options\n"); return -EINVAL; } } + + kfree(s->s_options); + s->s_options = new_opt; + config.setuid = setuid; config.setgid = setgid; config.uid = uid; config.gid = gid; config.mode = mode; + return 0; } @@ -84,6 +91,7 @@ static struct super_operations capifs_sops = { .statfs = simple_statfs, .remount_fs = capifs_remount, + .show_options = generic_show_options, }; @@ -182,9 +190,9 @@ static int __init capifs_init(void) char *p; int err; - if ((p = strchr(revision, ':')) != 0 && p[1]) { + if ((p = strchr(revision, ':')) != NULL && p[1]) { strlcpy(rev, p + 2, sizeof(rev)); - if ((p = strchr(rev, '$')) != 0 && p > rev) + if ((p = strchr(rev, '$')) != NULL && p > rev) *(p-1) = 0; } else strcpy(rev, "1.0");