All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] code cleanup on include/linux/fs.h
@ 2011-02-17  9:37 Steven Liu
  2011-02-17 11:50 ` Alexey Dobriyan
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Liu @ 2011-02-17  9:37 UTC (permalink / raw)
  To: torvalds, viro, dchinner; +Cc: linux-kernel, linux-fsdevel

Hi  all,

    Can this patch be fixed in,

     Cleanup the unsed code on  include/linux/fs.h.
     All filesystem using mount_bdev and mount_nodev
     to replace get_sb_bdev and get_sb_nodev.
     So rmmove the unused code.


 Signed-off-by: LiuQi <lingjiujianke@gmail.com.com>
---
 include/linux/fs.h |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index bd32159..53ad8e6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1807,10 +1807,6 @@ extern struct dentry *mount_ns(struct
file_system_type *fs_type, int flags,
 extern struct dentry *mount_bdev(struct file_system_type *fs_type,
 	int flags, const char *dev_name, void *data,
 	int (*fill_super)(struct super_block *, void *, int));
-extern int get_sb_bdev(struct file_system_type *fs_type,
-	int flags, const char *dev_name, void *data,
-	int (*fill_super)(struct super_block *, void *, int),
-	struct vfsmount *mnt);
 extern struct dentry *mount_single(struct file_system_type *fs_type,
 	int flags, void *data,
 	int (*fill_super)(struct super_block *, void *, int));
@@ -1821,10 +1817,6 @@ extern int get_sb_single(struct
file_system_type *fs_type,
 extern struct dentry *mount_nodev(struct file_system_type *fs_type,
 	int flags, void *data,
 	int (*fill_super)(struct super_block *, void *, int));
-extern int get_sb_nodev(struct file_system_type *fs_type,
-	int flags, void *data,
-	int (*fill_super)(struct super_block *, void *, int),
-	struct vfsmount *mnt);
 void generic_shutdown_super(struct super_block *sb);
 void kill_block_super(struct super_block *sb);
 void kill_anon_super(struct super_block *sb);
-- 
1.6.5.2




Best Regards


Steven Liu

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] code cleanup on include/linux/fs.h
@ 2011-02-17  9:38 Steven Liu
  2011-02-17 16:14 ` Ted Ts'o
  0 siblings, 1 reply; 6+ messages in thread
From: Steven Liu @ 2011-02-17  9:38 UTC (permalink / raw)
  To: Theodore Tso; +Cc: linux-ext4, liuqi

Hi Ted,


      Can this patch be fixed.

       Cleanup the unsed code on  include/linux/fs.h.
    All filesystem using mount_bdev and mount_nodev
    to replace get_sb_bdev and get_sb_nodev.
    So rmmove the unused code.


Signed-off-by: LiuQi <lingjiujianke@gmail.com.com>
---
 include/linux/fs.h |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index bd32159..53ad8e6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1807,10 +1807,6 @@ extern struct dentry *mount_ns(struct
file_system_type *fs_type, int flags,
 extern struct dentry *mount_bdev(struct file_system_type *fs_type,
 	int flags, const char *dev_name, void *data,
 	int (*fill_super)(struct super_block *, void *, int));
-extern int get_sb_bdev(struct file_system_type *fs_type,
-	int flags, const char *dev_name, void *data,
-	int (*fill_super)(struct super_block *, void *, int),
-	struct vfsmount *mnt);
 extern struct dentry *mount_single(struct file_system_type *fs_type,
 	int flags, void *data,
 	int (*fill_super)(struct super_block *, void *, int));
@@ -1821,10 +1817,6 @@ extern int get_sb_single(struct
file_system_type *fs_type,
 extern struct dentry *mount_nodev(struct file_system_type *fs_type,
 	int flags, void *data,
 	int (*fill_super)(struct super_block *, void *, int));
-extern int get_sb_nodev(struct file_system_type *fs_type,
-	int flags, void *data,
-	int (*fill_super)(struct super_block *, void *, int),
-	struct vfsmount *mnt);
 void generic_shutdown_super(struct super_block *sb);
 void kill_block_super(struct super_block *sb);
 void kill_anon_super(struct super_block *sb);
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] code cleanup on include/linux/fs.h
  2011-02-17  9:37 Steven Liu
@ 2011-02-17 11:50 ` Alexey Dobriyan
  2011-02-17 11:58   ` Steven Liu
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Dobriyan @ 2011-02-17 11:50 UTC (permalink / raw)
  To: Steven Liu; +Cc: torvalds, viro, dchinner, linux-kernel, linux-fsdevel

On Thu, Feb 17, 2011 at 11:37 AM, Steven Liu <lingjiujianke@gmail.com> wrote:
>     Cleanup the unsed code on  include/linux/fs.h.
>     All filesystem using mount_bdev and mount_nodev
>     to replace get_sb_bdev and get_sb_nodev.
>     So rmmove the unused code.

> -extern int get_sb_bdev(struct file_system_type *fs_type,
> -       int flags, const char *dev_name, void *data,
> -       int (*fill_super)(struct super_block *, void *, int),
> -       struct vfsmount *mnt);
>  extern struct dentry *mount_single(struct file_system_type *fs_type,
>        int flags, void *data,
>        int (*fill_super)(struct super_block *, void *, int));
> @@ -1821,10 +1817,6 @@ extern int get_sb_single(struct
> file_system_type *fs_type,
>  extern struct dentry *mount_nodev(struct file_system_type *fs_type,
>        int flags, void *data,
>        int (*fill_super)(struct super_block *, void *, int));
> -extern int get_sb_nodev(struct file_system_type *fs_type,
> -       int flags, void *data,
> -       int (*fill_super)(struct super_block *, void *, int),
> -       struct vfsmount *mnt);

The functions themselves are still in place, what's up?

fs/super.c:846:int get_sb_bdev(struct file_system_type *fs_type,
fs/super.c:861:EXPORT_SYMBOL(get_sb_bdev);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] code cleanup on include/linux/fs.h
  2011-02-17 11:50 ` Alexey Dobriyan
@ 2011-02-17 11:58   ` Steven Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Liu @ 2011-02-17 11:58 UTC (permalink / raw)
  To: Alexey Dobriyan; +Cc: torvalds, viro, dchinner, linux-kernel, linux-fsdevel

Hi  Alexey Dobriyan,

Signed-off-by: LiuQi <lingjiujianke@gmail.com>
---
 fs/super.c |   31 -------------------------------
 1 files changed, 0 insertions(+), 31 deletions(-)

diff --git a/fs/super.c b/fs/super.c
index 7e9dd4c..8272f26 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -843,22 +843,6 @@ error:
 }
 EXPORT_SYMBOL(mount_bdev);

-int get_sb_bdev(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data,
-       int (*fill_super)(struct super_block *, void *, int),
-       struct vfsmount *mnt)
-{
-       struct dentry *root;
-
-       root = mount_bdev(fs_type, flags, dev_name, data, fill_super);
-       if (IS_ERR(root))
-               return PTR_ERR(root);
-       mnt->mnt_root = root;
-       mnt->mnt_sb = root->d_sb;
-       return 0;
-}
-
-EXPORT_SYMBOL(get_sb_bdev);

 void kill_block_super(struct super_block *sb)
 {
@@ -897,21 +881,6 @@ struct dentry *mount_nodev(struct
file_system_type *fs_type,
 }
 EXPORT_SYMBOL(mount_nodev);

-int get_sb_nodev(struct file_system_type *fs_type,
-       int flags, void *data,
-       int (*fill_super)(struct super_block *, void *, int),
-       struct vfsmount *mnt)
-{
-       struct dentry *root;
-
-       root = mount_nodev(fs_type, flags, data, fill_super);
-       if (IS_ERR(root))
-               return PTR_ERR(root);
-       mnt->mnt_root = root;
-       mnt->mnt_sb = root->d_sb;
-       return 0;
-}
-EXPORT_SYMBOL(get_sb_nodev);

 static int compare_single(struct super_block *s, void *p)
 {
--
1.6.5.2




Best Regards


Steven Liu

2011/2/17 Alexey Dobriyan <adobriyan@gmail.com>:
> On Thu, Feb 17, 2011 at 11:37 AM, Steven Liu <lingjiujianke@gmail.com> wrote:
>>     Cleanup the unsed code on  include/linux/fs.h.
>>     All filesystem using mount_bdev and mount_nodev
>>     to replace get_sb_bdev and get_sb_nodev.
>>     So rmmove the unused code.
>
>> -extern int get_sb_bdev(struct file_system_type *fs_type,
>> -       int flags, const char *dev_name, void *data,
>> -       int (*fill_super)(struct super_block *, void *, int),
>> -       struct vfsmount *mnt);
>>  extern struct dentry *mount_single(struct file_system_type *fs_type,
>>        int flags, void *data,
>>        int (*fill_super)(struct super_block *, void *, int));
>> @@ -1821,10 +1817,6 @@ extern int get_sb_single(struct
>> file_system_type *fs_type,
>>  extern struct dentry *mount_nodev(struct file_system_type *fs_type,
>>        int flags, void *data,
>>        int (*fill_super)(struct super_block *, void *, int));
>> -extern int get_sb_nodev(struct file_system_type *fs_type,
>> -       int flags, void *data,
>> -       int (*fill_super)(struct super_block *, void *, int),
>> -       struct vfsmount *mnt);
>
> The functions themselves are still in place, what's up?
>
> fs/super.c:846:int get_sb_bdev(struct file_system_type *fs_type,
> fs/super.c:861:EXPORT_SYMBOL(get_sb_bdev);
>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] code cleanup on include/linux/fs.h
  2011-02-17  9:38 [PATCH] code cleanup on include/linux/fs.h Steven Liu
@ 2011-02-17 16:14 ` Ted Ts'o
  2011-02-17 17:25   ` Eric Sandeen
  0 siblings, 1 reply; 6+ messages in thread
From: Ted Ts'o @ 2011-02-17 16:14 UTC (permalink / raw)
  To: Steven Liu; +Cc: linux-ext4, liuqi

On Thu, Feb 17, 2011 at 05:38:43PM +0800, Steven Liu wrote:
> Hi Ted,
> 
> 
>       Can this patch be fixed.
> 
>        Cleanup the unsed code on  include/linux/fs.h.
>     All filesystem using mount_bdev and mount_nodev
>     to replace get_sb_bdev and get_sb_nodev.
>     So rmmove the unused code.

Um, why are you sending this to the linux-ext4 list?

And if you really want to get rid of get_sb_bdev and get_sb_nodev, you
should send a single patch which removes it from all files in the
Linux source tree, as well as updating references to these functions
in the Documentation/filesystems/porting file.

							- Ted

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] code cleanup on include/linux/fs.h
  2011-02-17 16:14 ` Ted Ts'o
@ 2011-02-17 17:25   ` Eric Sandeen
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Sandeen @ 2011-02-17 17:25 UTC (permalink / raw)
  To: Ted Ts'o; +Cc: Steven Liu, linux-ext4, liuqi

On 2/17/11 10:14 AM, Ted Ts'o wrote:
> On Thu, Feb 17, 2011 at 05:38:43PM +0800, Steven Liu wrote:
>> Hi Ted,
>>
>>
>>       Can this patch be fixed.
>>
>>        Cleanup the unsed code on  include/linux/fs.h.
>>     All filesystem using mount_bdev and mount_nodev
>>     to replace get_sb_bdev and get_sb_nodev.
>>     So rmmove the unused code.
> 
> Um, why are you sending this to the linux-ext4 list?

To be clear, sending this to linux-fsdevel and linux-kernel would probably
be more appropriate.  With the changes Ted suggested.

-Eric

> And if you really want to get rid of get_sb_bdev and get_sb_nodev, you
> should send a single patch which removes it from all files in the
> Linux source tree, as well as updating references to these functions
> in the Documentation/filesystems/porting file.
> 
> 							- Ted
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-02-17 17:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-17  9:38 [PATCH] code cleanup on include/linux/fs.h Steven Liu
2011-02-17 16:14 ` Ted Ts'o
2011-02-17 17:25   ` Eric Sandeen
  -- strict thread matches above, loose matches on Subject: below --
2011-02-17  9:37 Steven Liu
2011-02-17 11:50 ` Alexey Dobriyan
2011-02-17 11:58   ` Steven Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.