btrfs: return original error code when failing from option parsing
[sfrench/cifs-2.6.git] / fs / btrfs / super.c
index 170baef49faefe5e3fa91b1e2e5064f613629658..c67fafaa2fe713fa6358afcb2fd5197d917e6f7a 100644 (file)
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (C) 2007 Oracle.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License v2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 021110-1307, USA.
  */
 
 #include <linux/blkdev.h>
@@ -1795,10 +1782,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
        }
 
        ret = btrfs_parse_options(fs_info, data, *flags);
-       if (ret) {
-               ret = -EINVAL;
+       if (ret)
                goto restore;
-       }
 
        btrfs_remount_begin(fs_info, old_opts, *flags);
        btrfs_resize_thread_pool(fs_info,