From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ted Ts'o Subject: Re: [PATCH] code cleanup on fs/super.c Date: Thu, 17 Feb 2011 12:25:23 -0500 Message-ID: <20110217172523.GJ26780@thunk.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Steven Liu , viro@zeniv.linux.org.uk, randy.dunlap@oracle.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, dchinner@redhat.com, liuqi To: Linus Torvalds Return-path: Received: from li9-11.members.linode.com ([67.18.176.11]:40863 "EHLO test.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500Ab1BQRZe (ORCPT ); Thu, 17 Feb 2011 12:25:34 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Feb 17, 2011 at 08:20:31AM -0800, Linus Torvalds wrote: > On Thu, Feb 17, 2011 at 12:59 AM, Steven Liu wrote: > > > > =A0 Clean up the unsed code on fs/super.c, all filesystem using mou= nt_bdev > > =A0 and mount_nodev to replace get_sb_bdev and get_sb_nodev. >=20 > There might easily be external modules that still use this. >=20 > Also, if you do this, then the same patch would also need to remove > the declarations and the documentation entry, so that there is no sig= n > at all of those functions in the whole kernel tree. The documentation update should just state that previous users of get_sb_bdev() and get_sb_bdev() can and should just use mount_bdev() and mount_nodev() instead. The lines of code in the get_sb_*() functions that do this: mnt->mnt_root =3D root; mnt->mnt_sb =3D root->d_sb; Actually aren't necessary, since these functions are used in a filesystem's file_system_type->mount() function, and vfs_kern_mount(), which calls the type->mount() function, already does the above call. So telling external modules that if you use get_sb_bdev(), you should use mount_bdev() instead, should be just fine. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html