From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Subject: get_sb_single() - do not pass options twice Date: Thu, 05 Nov 2009 23:28:23 +0100 Message-ID: <1257460103.2126.0.camel@yio.site> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Greg KH To: linux-fsdevel Return-path: Received: from mail-bw0-f227.google.com ([209.85.218.227]:50343 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758944AbZKEWew (ORCPT ); Thu, 5 Nov 2009 17:34:52 -0500 Received: by bwz27 with SMTP id 27so543493bwz.21 for ; Thu, 05 Nov 2009 14:34:56 -0800 (PST) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: Kay Sievers Subject: vfs: get_sb_single() - do not pass options twice Filesystem code usually destroys the option buffer while parsing it, which leads to errors when the same buffer is passed twice. In case we fill a new superblock with the options, do not pass the options again to the remount() call. Cc: Greg KH Signed-off-by: Kay Sievers --- fs/super.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/super.c +++ b/fs/super.c @@ -900,6 +900,8 @@ int get_sb_single(struct file_system_typ deactivate_locked_super(s); return error; } + /* options usually get mangled and can only be parsed once */ + data = NULL; s->s_flags |= MS_ACTIVE; } do_remount_sb(s, flags, data, 0);