lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1209504893.8321.2.camel@heimdal.trondhjem.org>
Date:	Tue, 29 Apr 2008 14:34:53 -0700
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Dave Hansen <dave@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	viro@...iv.linux.org.uk, hch@...radead.org
Subject: Re: [RFC][PATCH 2/5] introduce simple_set_mnt_no_get() helper for
	NFS


On Tue, 2008-04-29 at 11:59 -0700, Dave Hansen wrote:
> The next patch will introduce a list of all mounts for a given
> superblock.  In order to keep the list, we need to make sure
> all filesystems attaching a mount to a superblock get added
> to this list.
> 
> NFS currently bypasses the simple_set_mnt() function, and sets
> mnt_sb directly.  This patch makes it use a helper function,
> instead.
> 
> Signed-off-by: Dave Hansen <dave@...ux.vnet.ibm.com>
> ---
> 
>  linux-2.6.git-dave/fs/namespace.c     |   11 +++++++++--
>  linux-2.6.git-dave/fs/nfs/super.c     |   10 +++++-----
>  linux-2.6.git-dave/include/linux/fs.h |    1 +
>  3 files changed, 15 insertions(+), 7 deletions(-)
> 
> diff -puN fs/namespace.c~introduce_simple_set_mnt_no_get_helper_for_NFS fs/namespace.c
> --- linux-2.6.git/fs/namespace.c~introduce_simple_set_mnt_no_get_helper_for_NFS	2008-04-29 11:56:39.000000000 -0700
> +++ linux-2.6.git-dave/fs/namespace.c	2008-04-29 11:56:39.000000000 -0700
> @@ -402,12 +402,19 @@ static void __mnt_unmake_readonly(struct
>  	spin_unlock(&vfsmount_lock);
>  }
>  
> -int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb)
> +int simple_set_mnt_no_get(struct vfsmount *mnt, struct super_block *sb)
>  {
>  	mnt->mnt_sb = sb;
> -	mnt->mnt_root = dget(sb->s_root);
> +	add_mount_to_sb_list(mnt, sb);
>  	return 0;
>  }
> +EXPORT_SYMBOL(simple_set_mnt_no_get);
> +
> +int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb)
> +{
> +	mnt->mnt_root = dget(sb->s_root);
> +	return simple_set_mnt_no_get(mnt, sb);
> +}
>  

My only concern is the proliferation of 'simple_*' operations: in some
cases in libfs.c we explicitly label those as being for in-memory/ramfs
filesystems, whereas in other cases (such as this one) the name appears
to be used for more generic functions.

Cheers
  Trond

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ