From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757016AbZA2GuD (ORCPT ); Thu, 29 Jan 2009 01:50:03 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751968AbZA2Gtx (ORCPT ); Thu, 29 Jan 2009 01:49:53 -0500 Received: from e32.co.us.ibm.com ([32.97.110.150]:42859 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbZA2Gtw (ORCPT ); Thu, 29 Jan 2009 01:49:52 -0500 Date: Wed, 28 Jan 2009 22:45:47 -0800 From: Sukadev Bhattiprolu To: Christoph Hellwig Cc: Alan Cox , hpa@zytor.com, serue@us.ibm.com, "David C. Hansen" , Containers , linux-kernel@vger.kernel.org, sukadev@us.ibm.com Subject: [RFC][PATCH 1/5] Unroll essentials of do_remount_sb() into devpts Message-ID: <20090129064547.GB23160@us.ibm.com> References: <20090129064259.GA23160@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090129064259.GA23160@us.ibm.com> X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sukadev Bhattiprolu Date: Tue, 27 Jan 2009 22:58:18 -0800 Subject: [RFC][PATCH 1/5] Unroll essentials of do_remount_sb() into devpts On remount, devpts fs only needs to parse the mount options. Users cannot directly create/dirty files in /dev/pts so the MS_RDONLY flag and shrinking the dcache does not really apply to devpts. So effectively on remount, devpts only parses the mount options and updates these options in its super block. As such, we could replace do_remount_sb() call with a direct parse_mount_options(). Doing so enables subsequent patches to avoid parsing the mount options twice and simplify the code. Signed-off-by: Sukadev Bhattiprolu --- fs/devpts/inode.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index ad186b4..de15e73 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -442,6 +442,8 @@ static int get_init_pts_sb(struct file_system_type *fs_type, int flags, void *data, struct vfsmount *mnt) { struct super_block *s; + struct pts_mount_opts *opts; + struct pts_fs_info *fsi; int error; s = sget(fs_type, compare_init_pts_sb, set_anon_super, NULL); @@ -458,7 +460,10 @@ static int get_init_pts_sb(struct file_system_type *fs_type, int flags, } s->s_flags |= MS_ACTIVE; } - do_remount_sb(s, flags, data, 0); + fsi = DEVPTS_SB(s); + opts = &fsi->mount_opts; + parse_mount_options(data, PARSE_REMOUNT, opts); + simple_set_mnt(mnt, s); return 0; } -- 1.5.2.5