Skip to content
  • Rob Landley's avatar
    initmpfs: make rootfs use tmpfs when CONFIG_TMPFS enabled · 16203a7a
    Rob Landley authored
    
    
    Conditionally call the appropriate fs_init function and fill_super
    functions.  Add a use once guard to shmem_init() to simply succeed on a
    second call.
    
    (Note that IS_ENABLED() is a compile time constant so dead code
    elimination removes unused function calls when CONFIG_TMPFS is disabled.)
    
    Signed-off-by: default avatarRob Landley <rob@landley.net>
    Cc: Jeff Layton <jlayton@redhat.com>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Stephen Warren <swarren@nvidia.com>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Cc: Jim Cromie <jim.cromie@gmail.com>
    Cc: Sam Ravnborg <sam@ravnborg.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    16203a7a