From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Poetzl Subject: Re: [RFC][PATCH 26/27] /proc/mounts: treat ro/rw like the rest Date: Thu, 8 Jun 2006 13:26:12 +0200 Message-ID: <20060608112612.GO11996@MAIL.13thfloor.at> References: <20060608001013.0D041507@localhost.localdomain> <20060608001039.CC972E9B@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, viro@ftp.linux.org.uk, hch@infradead.org, trond.myklebust@fys.uio.no Return-path: Received: from MAIL.13thfloor.at ([212.16.62.50]:7814 "EHLO mail.13thfloor.at") by vger.kernel.org with ESMTP id S932115AbWFHL0N (ORCPT ); Thu, 8 Jun 2006 07:26:13 -0400 To: Dave Hansen Content-Disposition: inline In-Reply-To: <20060608001039.CC972E9B@localhost.localdomain> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Wed, Jun 07, 2006 at 05:10:39PM -0700, Dave Hansen wrote: > > Originally from: Herbert Poetzl > > Now that we have the set/unset fields in the fs_info[] > array, we can stop special-casing the ro/rw bits. Signed-off-by: Herbert Poetzl > Signed-off-by: Dave Hansen > --- > > lxc-dave/fs/namespace.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletion(-) > > diff -puN fs/namespace.c~D7-proc-show-ro-attr-actual fs/namespace.c > --- lxc/fs/namespace.c~D7-proc-show-ro-attr-actual 2006-06-07 16:53:28.000000000 -0700 > +++ lxc-dave/fs/namespace.c 2006-06-07 16:53:28.000000000 -0700 > @@ -361,6 +361,7 @@ static int show_vfsmnt(struct seq_file * > char *set_str; > char *unset_str; > } fs_info[] = { > + { MS_RDONLY, MNT_RDONLY, "ro", "rw" }, > { MS_SYNCHRONOUS, 0, ",sync", NULL }, > { MS_DIRSYNC, 0, ",dirsync", NULL }, > { MS_MANDLOCK, 0, ",mand", NULL }, > @@ -376,7 +377,7 @@ static int show_vfsmnt(struct seq_file * > seq_path(m, mnt, mnt->mnt_root, " \t\n\\"); > seq_putc(m, ' '); > mangle(m, mnt->mnt_sb->s_type->name); > - seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? " ro" : " rw"); > + seq_putc(m, ' '); > for (i = 0; i < ARRAY_SIZE(fs_info); i++) { > struct proc_fs_info *fs_infop = &fs_info[i]; > char *str = NULL; > _