linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Steven Liu <lingjiujianke@gmail.com>,
	viro@zeniv.linux.org.uk, randy.dunlap@oracle.com,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	dchinner@redhat.com, liuqi <liuqi@thunderst.com>
Subject: Re: [PATCH] code cleanup on fs/super.c
Date: Thu, 17 Feb 2011 12:25:23 -0500	[thread overview]
Message-ID: <20110217172523.GJ26780@thunk.org> (raw)
In-Reply-To: <AANLkTim2fg5OUw2aZXA-4V4O7PUQ6T4mhoWxvjNdtYcc@mail.gmail.com>

On Thu, Feb 17, 2011 at 08:20:31AM -0800, Linus Torvalds wrote:
> On Thu, Feb 17, 2011 at 12:59 AM, Steven Liu <lingjiujianke@gmail.com> wrote:
> >
> >   Clean up the unsed code on fs/super.c, all filesystem using mount_bdev
> >   and mount_nodev to replace get_sb_bdev and get_sb_nodev.
> 
> There might easily be external modules that still use this.
> 
> 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 sign
> 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 = root;
	  mnt->mnt_sb = 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

  reply	other threads:[~2011-02-17 17:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17  8:59 [PATCH] code cleanup on fs/super.c Steven Liu
2011-02-17 16:20 ` Linus Torvalds
2011-02-17 17:25   ` Ted Ts'o [this message]
2011-02-17 17:36   ` Al Viro
2011-02-18  2:45     ` Steven Liu
2011-02-18  3:08       ` Al Viro
2011-03-21  4:00     ` LiuQi
2011-03-21  4:43       ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110217172523.GJ26780@thunk.org \
    --to=tytso@mit.edu \
    --cc=dchinner@redhat.com \
    --cc=lingjiujianke@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuqi@thunderst.com \
    --cc=randy.dunlap@oracle.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).