From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Subject: Re: get_sb_single() - do not pass options twice Date: Sat, 12 Dec 2009 11:07:54 +0100 Message-ID: References: <1257460103.2126.0.camel@yio.site> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Greg KH To: linux-fsdevel , linux-kernel Return-path: In-Reply-To: <1257460103.2126.0.camel@yio.site> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Nov 5, 2009 at 23:28, Kay Sievers wrote: > 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. Ping! Can someone please have a look and comment on that? Something like this will now be needed for 2.6.33 to silent a warning. Thanks, Kay > Cc: Greg KH > Signed-off-by: Kay Sievers > --- > =C2=A0fs/super.c | =C2=A0 =C2=A02 ++ > =C2=A01 file changed, 2 insertions(+) > > --- a/fs/super.c > +++ b/fs/super.c > @@ -900,6 +900,8 @@ int get_sb_single(struct file_system_typ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0deactivate_locked_super(s); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0return error; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* options usually= get mangled and can only be parsed once */ > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 data =3D NULL; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0s->s_flags |=3D= MS_ACTIVE; > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > =C2=A0 =C2=A0 =C2=A0 =C2=A0do_remount_sb(s, flags, data, 0);