diff options
-rw-r--r-- | fs/compat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/compat.c b/fs/compat.c index 2a88477330fc..263990ae4096 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -2170,9 +2170,12 @@ asmlinkage long compat_sys_nfsservctl(int cmd, struct compat_nfsctl_arg __user * default: err = -EINVAL; - goto done; + break; } + if (err) + goto done; + oldfs = get_fs(); set_fs(KERNEL_DS); /* The __user pointer casts are valid because of the set_fs() */ |