diff options
author | Benoit Goby <benoit@android.com> | 2013-01-08 19:57:09 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-27 20:49:01 -0800 |
commit | cf8c21513eadeb9a3edf87e63975bdab60bcf657 (patch) | |
tree | 1d7d5b7cea1f7e0f645d71bf8643abd36cd76c79 | |
parent | bda2b180545b2ef586658ed5c3312cb947a2a6c9 (diff) | |
download | lwn-cf8c21513eadeb9a3edf87e63975bdab60bcf657.tar.gz lwn-cf8c21513eadeb9a3edf87e63975bdab60bcf657.zip |
usb: gadget: FunctionFS: Fix missing braces in parse_opts
commit b810075002c9f25a6da83cecda39d789000a04a9 upstream.
Add missing braces around an if block in ffs_fs_parse_opts. This broke
parsing the uid/gid mount options and causes mount to fail when using
uid/gid. This has been introduced by commit b9b73f7c (userns: Convert usb
functionfs to use kuid/kgid where appropriate) in 3.7.
Signed-off-by: Benoit Goby <benoit@android.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/gadget/f_fs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index 64c4ec10d1fc..7c52ed4e7f0a 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c @@ -1153,15 +1153,15 @@ static int ffs_fs_parse_opts(struct ffs_sb_fill_data *data, char *opts) pr_err("%s: unmapped value: %lu\n", opts, value); return -EINVAL; } - } - else if (!memcmp(opts, "gid", 3)) + } else if (!memcmp(opts, "gid", 3)) { data->perms.gid = make_kgid(current_user_ns(), value); if (!gid_valid(data->perms.gid)) { pr_err("%s: unmapped value: %lu\n", opts, value); return -EINVAL; } - else + } else { goto invalid; + } break; default: |