Re: fs: remove now stale label in anon_inode_init()

From: Dave Jones
Date: Wed Mar 26 2014 - 13:34:20 EST


On Wed, Mar 26, 2014 at 12:45:10AM +0000, Linux Kernel wrote:
> Gitweb: http://git.kernel.org/linus/;a=commit;h=fce7fc79c8f7188dfc5eafa1b937bcc3c5a4c2f5
> Commit: fce7fc79c8f7188dfc5eafa1b937bcc3c5a4c2f5
> Parent: d6f2589ad561aa5fa39f347eca6942668b7560a1
> Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> AuthorDate: Tue Mar 25 17:43:34 2014 -0700
> Committer: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> CommitDate: Tue Mar 25 17:43:34 2014 -0700
>
> fs: remove now stale label in anon_inode_init()
>
> The previous commit removed the register_filesystem() call and the
> associated error handling, but left the label for the error path that no
> longer exists. Remove that too.
>
> Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> ---
> fs/anon_inodes.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
> index 4b4543b..42fcc46 100644
> --- a/fs/anon_inodes.c
> +++ b/fs/anon_inodes.c
> @@ -186,7 +186,6 @@ static int __init anon_inode_init(void)
>
> err_unregister_filesystem:
> unregister_filesystem(&anon_inode_fs_type);
> -err_exit:
> panic(KERN_ERR "anon_inode_init() failed (%d)\n", error);

If we're about to panic, is there any point in doing the unregister ?
Looks like that function could just be..

anon_inode_mnt = kern_mount(&anon_inode_fs_type);
if (IS_ERR(anon_inode_mnt)) {
error = PTR_ERR(anon_inode_mnt);
panic(KERN_ERR "anon_inode_init() failed (%d)\n", error);
}
return 0;

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