Unionfs: update/assign a KERN_* level to all printk statements
authorErez Zadok <ezk@cs.sunysb.edu>
Sat, 29 Sep 2007 05:36:57 +0000 (01:36 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 29 Apr 2011 02:24:59 +0000 (22:24 -0400)
Also use pr_info() instead of printk(KERN_INFO ...)

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
12 files changed:
fs/unionfs/commonfops.c
fs/unionfs/copyup.c
fs/unionfs/dentry.c
fs/unionfs/file.c
fs/unionfs/inode.c
fs/unionfs/lookup.c
fs/unionfs/main.c
fs/unionfs/mmap.c
fs/unionfs/rdstate.c
fs/unionfs/rename.c
fs/unionfs/subr.c
fs/unionfs/super.c

index 278aa5db815701eefd51c33d0ae3c6deddd5b622..b42a6f4a403173ddbb0d52f2cdf0030b3e296f6e 100644 (file)
@@ -760,8 +760,8 @@ long unionfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        switch (cmd) {
        case UNIONFS_IOCTL_INCGEN:
                /* Increment the superblock generation count */
-               printk("unionfs: incgen ioctl deprecated; "
-                      "use \"-o remount,incgen\"\n");
+               pr_info("unionfs: incgen ioctl deprecated; "
+                       "use \"-o remount,incgen\"\n");
                err = -ENOSYS;
                break;
 
index 4eb5f8285fc0030871298c2fe767610eb8a6e522..fb6fcaeae9bef0cba00beb9730c93d629ce89aad 100644 (file)
@@ -209,7 +209,7 @@ static int __copyup_ndentry(struct dentry *old_lower_dentry,
                err = args.err;
                release_lower_nd(&nd, err);
        } else {
-               printk(KERN_ERR "unionfs: unknown inode type %d\n",
+               printk(KERN_CRIT "unionfs: unknown inode type %d\n",
                       old_mode);
                BUG();
        }
index 5dde6af2bcf7eeba812c8686f5d194352ab06124..248c79d697a00ed2f891e4233a1ba2123e544038 100644 (file)
@@ -218,17 +218,17 @@ bool is_newer_lower(const struct dentry *dentry)
                 */
                if (unlikely(timespec_compare(&inode->i_mtime,
                                              &lower_inode->i_mtime) < 0)) {
-                       printk("unionfs: new lower inode mtime "
-                              "(bindex=%d, name=%s)\n", bindex,
-                              dentry->d_name.name);
+                       pr_info("unionfs: new lower inode mtime "
+                               "(bindex=%d, name=%s)\n", bindex,
+                               dentry->d_name.name);
                        show_dinode_times(dentry);
                        return true; /* mtime changed! */
                }
                if (unlikely(timespec_compare(&inode->i_ctime,
                                              &lower_inode->i_ctime) < 0)) {
-                       printk("unionfs: new lower inode ctime "
-                              "(bindex=%d, name=%s)\n", bindex,
-                              dentry->d_name.name);
+                       pr_info("unionfs: new lower inode ctime "
+                               "(bindex=%d, name=%s)\n", bindex,
+                               dentry->d_name.name);
                        show_dinode_times(dentry);
                        return true; /* ctime changed! */
                }
@@ -328,7 +328,7 @@ bool __unionfs_d_revalidate_chain(struct dentry *dentry, struct nameidata *nd,
         */
        chain = kzalloc(chain_len * sizeof(struct dentry *), GFP_KERNEL);
        if (unlikely(!chain)) {
-               printk("unionfs: no more memory in %s\n", __FUNCTION__);
+               printk(KERN_CRIT "unionfs: no more memory in %s\n", __FUNCTION__);
                goto out;
        }
 
@@ -449,12 +449,12 @@ static void unionfs_d_release(struct dentry *dentry)
        unionfs_check_dentry(dentry);
        /* this could be a negative dentry, so check first */
        if (unlikely(!UNIONFS_D(dentry))) {
-               printk(KERN_DEBUG "unionfs: dentry without private data: %.*s\n",
+               printk(KERN_ERR "unionfs: dentry without private data: %.*s\n",
                       dentry->d_name.len, dentry->d_name.name);
                goto out;
        } else if (dbstart(dentry) < 0) {
                /* this is due to a failed lookup */
-               printk(KERN_DEBUG "unionfs: dentry without lower "
+               printk(KERN_ERR "unionfs: dentry without lower "
                       "dentries: %.*s\n",
                       dentry->d_name.len, dentry->d_name.name);
                goto out_free;
index 82959d1c8b668665cc27e2f4337bf3f8895c37dd..923f1343175a889fe3a2d9a7c80dec4dd3f21442 100644 (file)
@@ -121,12 +121,13 @@ static int unionfs_mmap(struct file *file, struct vm_area_struct *vma)
        lower_file = unionfs_lower_file(file);
        if (willwrite && !lower_file->f_mapping->a_ops->writepage) {
                err = -EINVAL;
-               printk("unionfs: branch %d file system does not support "
-                      "writeable mmap\n", fbstart(file));
+               printk(KERN_ERR "unionfs: branch %d file system does not "
+                      "support writeable mmap\n", fbstart(file));
        } else {
                err = generic_file_mmap(file, vma);
                if (err)
-                       printk("unionfs: generic_file_mmap failed %d\n", err);
+                       printk(KERN_ERR
+                              "unionfs: generic_file_mmap failed %d\n", err);
        }
 
 out:
index ba85a679e91174f5f04ef4a52fd693d0da12fe5c..49b5baf20c804722a5edbe53c6ce94a2fbc0655e 100644 (file)
@@ -90,8 +90,8 @@ static int unionfs_create(struct inode *parent, struct dentry *dentry,
                        unlock_dir(lower_dir_dentry);
 
                        if (err) {
-                               printk("unionfs: create: could not unlink "
-                                      "whiteout, err = %d\n", err);
+                               printk(KERN_ERR "unionfs: create: could not "
+                                      "unlink whiteout, err = %d\n", err);
                                goto out;
                        }
                }
@@ -446,7 +446,7 @@ static int unionfs_symlink(struct inode *dir, struct dentry *dentry,
                                if (IS_ERR(lower_dentry))
                                        err = PTR_ERR(lower_dentry);
 
-                               printk(KERN_DEBUG "unionfs: lower dentry "
+                               printk(KERN_ERR "unionfs: lower dentry "
                                       "NULL (or error) for bindex = %d\n",
                                       bindex);
                                continue;
@@ -588,7 +588,7 @@ static int unionfs_mkdir(struct inode *parent, struct dentry *dentry, int mode)
                                                      dentry->d_name.name,
                                                      bindex);
                        if (!lower_dentry || IS_ERR(lower_dentry)) {
-                               printk(KERN_DEBUG "unionfs: lower dentry "
+                               printk(KERN_ERR "unionfs: lower dentry "
                                       " NULL for bindex = %d\n", bindex);
                                continue;
                        }
@@ -732,7 +732,7 @@ static int unionfs_mknod(struct inode *dir, struct dentry *dentry, int mode,
                                                      dentry->d_name.name,
                                                      bindex);
                        if (IS_ERR(lower_dentry)) {
-                               printk(KERN_DEBUG "unionfs: failed to create "
+                               printk(KERN_ERR "unionfs: failed to create "
                                       "parents on %d, err = %ld\n",
                                       bindex, PTR_ERR(lower_dentry));
                                continue;
@@ -878,7 +878,8 @@ static void unionfs_put_link(struct dentry *dentry, struct nameidata *nd,
 
        unionfs_lock_dentry(dentry);
        if (unlikely(!__unionfs_d_revalidate_chain(dentry, nd, false)))
-               printk("unionfs: put_link failed to revalidate dentry\n");
+               printk(KERN_ERR
+                      "unionfs: put_link failed to revalidate dentry\n");
        unionfs_unlock_dentry(dentry);
 
        unionfs_check_dentry(dentry);
@@ -1088,7 +1089,8 @@ static int unionfs_setattr(struct dentry *dentry, struct iattr *ia)
                if (ia->ia_size != i_size_read(inode)) {
                        err = vmtruncate(inode, ia->ia_size);
                        if (err)
-                               printk("unionfs: setattr: vmtruncate failed\n");
+                               printk(KERN_ERR
+                                      "unionfs: setattr: vmtruncate failed\n");
                }
        }
 
index 9c6fd5692b790810914f87e89fe4e99e0d86533c..981c0d98ae6fe70f54039707248412ee73ed0359 100644 (file)
@@ -214,7 +214,7 @@ struct dentry *unionfs_lookup_backend(struct dentry *dentry,
                                break;
                        }
                        err = -EIO;
-                       printk(KERN_NOTICE "unionfs: EIO: invalid whiteout "
+                       printk(KERN_ERR "unionfs: EIO: invalid whiteout "
                               "entry type %d.\n",
                               wh_lower_dentry->d_inode->i_mode);
                        dput(wh_lower_dentry);
index 185ddb8907413f84b3efd3e03048853570d332ba..25d1461d44b6be4588dfe541165143b09b6ab3e2 100644 (file)
@@ -175,7 +175,7 @@ skip:
                /* Do nothing. */
                break;
        default:
-               printk(KERN_ERR "unionfs: invalid interpose flag passed!\n");
+               printk(KERN_CRIT "unionfs: invalid interpose flag passed!\n");
                BUG();
        }
        goto out;
@@ -303,7 +303,7 @@ static int parse_dirs_option(struct super_block *sb, struct unionfs_dentry_info
        struct dentry *dent2;
 
        if (options[0] == '\0') {
-               printk(KERN_WARNING "unionfs: no branches specified\n");
+               printk(KERN_ERR "unionfs: no branches specified\n");
                err = -EINVAL;
                goto out;
        }
@@ -358,14 +358,14 @@ static int parse_dirs_option(struct super_block *sb, struct unionfs_dentry_info
 
                err = path_lookup(name, LOOKUP_FOLLOW, &nd);
                if (err) {
-                       printk(KERN_WARNING "unionfs: error accessing "
+                       printk(KERN_ERR "unionfs: error accessing "
                               "lower directory '%s' (error %d)\n",
                               name, err);
                        goto out;
                }
 
                if ((err = check_branch(&nd))) {
-                       printk(KERN_WARNING "unionfs: lower directory "
+                       printk(KERN_ERR "unionfs: lower directory "
                               "'%s' is not a valid branch\n", name);
                        path_release(&nd);
                        goto out;
@@ -385,7 +385,7 @@ static int parse_dirs_option(struct super_block *sb, struct unionfs_dentry_info
        }
 
        if (branches == 0) {
-               printk(KERN_WARNING "unionfs: no branches specified\n");
+               printk(KERN_ERR "unionfs: no branches specified\n");
                err = -EINVAL;
                goto out;
        }
@@ -412,7 +412,7 @@ static int parse_dirs_option(struct super_block *sb, struct unionfs_dentry_info
                for (j = i + 1; j < branches; j++) {
                        dent2 = lower_root_info->lower_paths[j].dentry;
                        if (is_branch_overlap(dent1, dent2)) {
-                               printk(KERN_WARNING "unionfs: branches %d and "
+                               printk(KERN_ERR "unionfs: branches %d and "
                                       "%d overlap\n", i, j);
                                err = -EINVAL;
                                goto out;
@@ -485,14 +485,15 @@ static struct unionfs_dentry_info *unionfs_parse_options(
                 * don't, above this check.
                 */
                if (!optarg) {
-                       printk("unionfs: %s requires an argument.\n", optname);
+                       printk(KERN_ERR "unionfs: %s requires an argument.\n",
+                              optname);
                        err = -EINVAL;
                        goto out_error;
                }
 
                if (!strcmp("dirs", optname)) {
                        if (++dirsfound > 1) {
-                               printk(KERN_WARNING
+                               printk(KERN_ERR
                                       "unionfs: multiple dirs specified\n");
                                err = -EINVAL;
                                goto out_error;
@@ -506,7 +507,7 @@ static struct unionfs_dentry_info *unionfs_parse_options(
                /* All of these options require an integer argument. */
                intval = simple_strtoul(optarg, &endptr, 0);
                if (*endptr) {
-                       printk(KERN_WARNING
+                       printk(KERN_ERR
                               "unionfs: invalid %s option '%s'\n",
                               optname, optarg);
                        err = -EINVAL;
@@ -514,12 +515,12 @@ static struct unionfs_dentry_info *unionfs_parse_options(
                }
 
                err = -EINVAL;
-               printk(KERN_WARNING
+               printk(KERN_ERR
                       "unionfs: unrecognized option '%s'\n", optname);
                goto out_error;
        }
        if (dirsfound != 1) {
-               printk(KERN_WARNING "unionfs: dirs option required\n");
+               printk(KERN_ERR "unionfs: dirs option required\n");
                err = -EINVAL;
                goto out_error;
        }
@@ -591,7 +592,7 @@ static int unionfs_read_super(struct super_block *sb, void *raw_data,
        int bindex, bstart, bend;
 
        if (!raw_data) {
-               printk(KERN_WARNING
+               printk(KERN_ERR
                       "unionfs: read_super: missing data argument\n");
                err = -EINVAL;
                goto out;
@@ -600,7 +601,7 @@ static int unionfs_read_super(struct super_block *sb, void *raw_data,
        /* Allocate superblock private data */
        sb->s_fs_info = kzalloc(sizeof(struct unionfs_sb_info), GFP_KERNEL);
        if (unlikely(!UNIONFS_SB(sb))) {
-               printk(KERN_WARNING "unionfs: read_super: out of memory\n");
+               printk(KERN_CRIT "unionfs: read_super: out of memory\n");
                err = -ENOMEM;
                goto out;
        }
@@ -612,7 +613,7 @@ static int unionfs_read_super(struct super_block *sb, void *raw_data,
 
        lower_root_info = unionfs_parse_options(sb, raw_data);
        if (IS_ERR(lower_root_info)) {
-               printk(KERN_WARNING
+               printk(KERN_ERR
                       "unionfs: read_super: error while parsing options "
                       "(err = %ld)\n", PTR_ERR(lower_root_info));
                err = PTR_ERR(lower_root_info);
@@ -735,7 +736,7 @@ static int __init init_unionfs_fs(void)
 {
        int err;
 
-       printk("Registering unionfs " UNIONFS_VERSION "\n");
+       pr_info("Registering unionfs " UNIONFS_VERSION "\n");
 
        if (unlikely((err = unionfs_init_filldir_cache())))
                goto out;
@@ -763,7 +764,7 @@ static void __exit exit_unionfs_fs(void)
        unionfs_destroy_inode_cache();
        unionfs_destroy_dentry_cache();
        unregister_filesystem(&unionfs_fs_type);
-       printk("Completed unionfs module unload.\n");
+       pr_info("Completed unionfs module unload\n");
 }
 
 MODULE_AUTHOR("Erez Zadok, Filesystems and Storage Lab, Stony Brook University"
index 8928e99905878fa1cc21a6e6c78e4e0a66ac0883..37ad76162158974729f3923e9863c498293a756e 100644 (file)
@@ -347,7 +347,7 @@ static void unionfs_sync_page(struct page *page)
         */
        lower_page = find_lock_page(lower_inode->i_mapping, page->index);
        if (!lower_page) {
-               printk(KERN_DEBUG "unionfs: find_lock_page failed\n");
+               printk(KERN_ERR "unionfs: find_lock_page failed\n");
                goto out;
        }
 
index 0fdd3648eaf1098e3c0951531d3d29b2a9f8cb19..46cf2df64cbf33149cdcf6e47525dd7455659482 100644 (file)
@@ -218,7 +218,7 @@ struct filldir_node *find_filldir_node(struct unionfs_dir_state *rdstate,
                         * system is corrupted.
                         */
                        if (unlikely(cursor->bindex == rdstate->bindex)) {
-                               printk(KERN_DEBUG "unionfs: filldir: possible "
+                               printk(KERN_ERR "unionfs: filldir: possible "
                                       "I/O error: a file is duplicated "
                                       "in the same branch %d: %s\n",
                                       rdstate->bindex, cursor->name);
index 226bcea6f6ee5b404789c9dc01201af1e548db02..c90405d93f4ac3fec46245c63b702650efc06e99 100644 (file)
@@ -40,7 +40,7 @@ static int __unionfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                                       new_dentry, new_dentry->d_name.name,
                                       bindex);
                if (IS_ERR(lower_new_dentry)) {
-                       printk(KERN_DEBUG "unionfs: error creating directory "
+                       printk(KERN_ERR "unionfs: error creating directory "
                               "tree for rename, bindex = %d, err = %ld\n",
                               bindex, PTR_ERR(lower_new_dentry));
                        err = PTR_ERR(lower_new_dentry);
@@ -66,7 +66,7 @@ static int __unionfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        if (lower_wh_dentry->d_inode) {
                /* get rid of the whiteout that is existing */
                if (lower_new_dentry->d_inode) {
-                       printk(KERN_WARNING "unionfs: both a whiteout and a "
+                       printk(KERN_ERR "unionfs: both a whiteout and a "
                               "dentry exist when doing a rename!\n");
                        err = -EIO;
 
@@ -293,14 +293,14 @@ revert:
        /* Do revert here. */
        local_err = unionfs_refresh_lower_dentry(new_dentry, old_bstart);
        if (local_err) {
-               printk(KERN_WARNING "unionfs: revert failed in rename: "
+               printk(KERN_ERR "unionfs: revert failed in rename: "
                       "the new refresh failed.\n");
                eio = -EIO;
        }
 
        local_err = unionfs_refresh_lower_dentry(old_dentry, old_bstart);
        if (local_err) {
-               printk(KERN_WARNING "unionfs: revert failed in rename: "
+               printk(KERN_ERR "unionfs: revert failed in rename: "
                       "the old refresh failed.\n");
                eio = -EIO;
                goto revert_out;
@@ -308,7 +308,7 @@ revert:
 
        if (!unionfs_lower_dentry_idx(new_dentry, bindex) ||
            !unionfs_lower_dentry_idx(new_dentry, bindex)->d_inode) {
-               printk(KERN_WARNING "unionfs: revert failed in rename: "
+               printk(KERN_ERR "unionfs: revert failed in rename: "
                       "the object disappeared from under us!\n");
                eio = -EIO;
                goto revert_out;
@@ -316,7 +316,7 @@ revert:
 
        if (unionfs_lower_dentry_idx(old_dentry, bindex) &&
            unionfs_lower_dentry_idx(old_dentry, bindex)->d_inode) {
-               printk(KERN_WARNING "unionfs: revert failed in rename: "
+               printk(KERN_ERR "unionfs: revert failed in rename: "
                       "the object was created underneath us!\n");
                eio = -EIO;
                goto revert_out;
@@ -327,7 +327,7 @@ revert:
 
        /* If we can't fix it, then we cop-out with -EIO. */
        if (local_err) {
-               printk(KERN_WARNING "unionfs: revert failed in rename!\n");
+               printk(KERN_ERR "unionfs: revert failed in rename!\n");
                eio = -EIO;
        }
 
index 3183678d63d936d2aa82009d54532b1cae8e49ec..ab409ce9a4a9cecfd8cdb2c13b09d4bdfb6cd136 100644 (file)
@@ -61,7 +61,7 @@ int create_whiteout(struct dentry *dentry, int start)
                                                      dentry->d_name.name,
                                                      bindex);
                        if (!lower_dentry || IS_ERR(lower_dentry)) {
-                               printk(KERN_DEBUG "unionfs: create_parents "
+                               printk(KERN_ERR "unionfs: create_parents "
                                       "failed for bindex = %d\n", bindex);
                                continue;
                        }
index 1279df6f54029cb65db557943f1f21366b74834a..798def934e2b5a1b1bb3fcc6525a6e0d1f03e70a 100644 (file)
@@ -45,7 +45,7 @@ static void unionfs_read_inode(struct inode *inode)
        size = sbmax(inode->i_sb) * sizeof(struct inode *);
        info->lower_inodes = kzalloc(size, GFP_KERNEL);
        if (unlikely(!info->lower_inodes)) {
-               printk(KERN_ERR "unionfs: no kernel memory when allocating "
+               printk(KERN_CRIT "unionfs: no kernel memory when allocating "
                       "lower-pointer array!\n");
                BUG();
        }
@@ -99,7 +99,8 @@ static void unionfs_put_super(struct super_block *sb)
        /* Make sure we have no leaks of branchget/branchput. */
        for (bindex = bstart; bindex <= bend; bindex++)
                if (unlikely(branch_count(sb, bindex) != 0)) {
-                       printk("unionfs: branch %d has %d references left!\n",
+                       printk(KERN_CRIT
+                              "unionfs: branch %d has %d references left!\n",
                               bindex, branch_count(sb, bindex));
                        leaks = 1;
                }
@@ -171,17 +172,19 @@ static noinline int do_remount_mode_option(char *optarg, int cur_branches,
 
        /* by now, optarg contains the branch name */
        if (!*optarg) {
-               printk("unionfs: no branch specified for mode change.\n");
+               printk(KERN_ERR
+                      "unionfs: no branch specified for mode change.\n");
                goto out;
        }
        if (!modename) {
-               printk("unionfs: branch \"%s\" requires a mode.\n", optarg);
+               printk(KERN_ERR "unionfs: branch \"%s\" requires a mode.\n",
+                      optarg);
                goto out;
        }
        *modename++ = '\0';
        perms = __parse_branch_mode(modename);
        if (perms == 0) {
-               printk("unionfs: invalid mode \"%s\" for \"%s\".\n",
+               printk(KERN_ERR "unionfs: invalid mode \"%s\" for \"%s\".\n",
                       modename, optarg);
                goto out;
        }
@@ -194,7 +197,7 @@ static noinline int do_remount_mode_option(char *optarg, int cur_branches,
         */
        err = path_lookup(optarg, LOOKUP_FOLLOW, &nd);
        if (err) {
-               printk(KERN_WARNING "unionfs: error accessing "
+               printk(KERN_ERR "unionfs: error accessing "
                       "lower directory \"%s\" (error %d)\n",
                       optarg, err);
                goto out;
@@ -206,7 +209,7 @@ static noinline int do_remount_mode_option(char *optarg, int cur_branches,
        path_release(&nd);      /* no longer needed */
        if (idx == cur_branches) {
                err = -ENOENT;  /* err may have been reset above */
-               printk(KERN_WARNING "unionfs: branch \"%s\" "
+               printk(KERN_ERR "unionfs: branch \"%s\" "
                       "not found\n", optarg);
                goto out;
        }
@@ -237,7 +240,7 @@ static noinline int do_remount_del_option(char *optarg, int cur_branches,
         */
        err = path_lookup(optarg, LOOKUP_FOLLOW, &nd);
        if (err) {
-               printk(KERN_WARNING "unionfs: error accessing "
+               printk(KERN_ERR "unionfs: error accessing "
                       "lower directory \"%s\" (error %d)\n",
                       optarg, err);
                goto out;
@@ -248,7 +251,7 @@ static noinline int do_remount_del_option(char *optarg, int cur_branches,
                        break;
        path_release(&nd);      /* no longer needed */
        if (idx == cur_branches) {
-               printk(KERN_WARNING "unionfs: branch \"%s\" "
+               printk(KERN_ERR "unionfs: branch \"%s\" "
                       "not found\n", optarg);
                err = -ENOENT;
                goto out;
@@ -321,7 +324,7 @@ static noinline int do_remount_add_option(char *optarg, int cur_branches,
         */
        err = path_lookup(optarg, LOOKUP_FOLLOW, &nd);
        if (err) {
-               printk(KERN_WARNING "unionfs: error accessing "
+               printk(KERN_ERR "unionfs: error accessing "
                       "lower directory \"%s\" (error %d)\n",
                       optarg, err);
                goto out;
@@ -332,7 +335,7 @@ static noinline int do_remount_add_option(char *optarg, int cur_branches,
                        break;
        path_release(&nd);      /* no longer needed */
        if (idx == cur_branches) {
-               printk(KERN_WARNING "unionfs: branch \"%s\" "
+               printk(KERN_ERR "unionfs: branch \"%s\" "
                       "not found\n", optarg);
                err = -ENOENT;
                goto out;
@@ -351,13 +354,13 @@ found_insertion_point:
        perms = parse_branch_mode(modename);
 
        if (!new_branch || !*new_branch) {
-               printk(KERN_WARNING "unionfs: null new branch\n");
+               printk(KERN_ERR "unionfs: null new branch\n");
                err = -EINVAL;
                goto out;
        }
        err = path_lookup(new_branch, LOOKUP_FOLLOW, &nd);
        if (err) {
-               printk(KERN_WARNING "unionfs: error accessing "
+               printk(KERN_ERR "unionfs: error accessing "
                       "lower directory \"%s\" (error %d)\n",
                       new_branch, err);
                goto out;
@@ -370,7 +373,7 @@ found_insertion_point:
         * code base supports that correctly.
         */
        if ((err = check_branch(&nd))) {
-               printk(KERN_WARNING "unionfs: lower directory "
+               printk(KERN_ERR "unionfs: lower directory "
                       "\"%s\" is not a valid branch\n", optarg);
                path_release(&nd);
                goto out;
@@ -454,7 +457,7 @@ static int unionfs_remount_fs(struct super_block *sb, int *flags,
         * allowed/supported as of now).
         */
        if ((*flags & ~(MS_RDONLY | MS_SILENT)) != 0) {
-               printk(KERN_WARNING
+               printk(KERN_ERR
                       "unionfs: remount flags 0x%x unsupported\n", *flags);
                err = -EINVAL;
                goto out_error;
@@ -499,7 +502,7 @@ static int unionfs_remount_fs(struct super_block *sb, int *flags,
        kfree(tmp_to_free);
        /* after all changes, will we have at least one branch left? */
        if ((new_branches + add_branches - del_branches) < 1) {
-               printk(KERN_WARNING
+               printk(KERN_ERR
                       "unionfs: no branches left after remount\n");
                err = -EINVAL;
                goto out_free;
@@ -580,7 +583,7 @@ static int unionfs_remount_fs(struct super_block *sb, int *flags,
                 * contains the CMD part and optarg contains the ARG part.
                 */
                if (!optarg || !*optarg) {
-                       printk("unionfs: all remount options require "
+                       printk(KERN_ERR "unionfs: all remount options require "
                               "an argument (%s).\n", optname);
                        err = -EINVAL;
                        goto out_release;
@@ -595,7 +598,7 @@ static int unionfs_remount_fs(struct super_block *sb, int *flags,
                                goto out_release;
                        new_branches++;
                        if (new_branches > UNIONFS_MAX_BRANCHES) {
-                               printk("unionfs: command exceeds "
+                               printk(KERN_ERR "unionfs: command exceeds "
                                       "%d branches\n", UNIONFS_MAX_BRANCHES);
                                err = -E2BIG;
                                goto out_release;
@@ -637,7 +640,7 @@ static int unionfs_remount_fs(struct super_block *sb, int *flags,
                }
 
                err = -EINVAL;
-               printk(KERN_WARNING
+               printk(KERN_ERR
                       "unionfs: unrecognized option \"%s\"\n", optname);
                goto out_release;
        }
@@ -653,7 +656,7 @@ out_no_change:
         *******************************************************************/
 
        if (!(tmp_data[0].branchperms & MAY_WRITE)) {
-               printk("unionfs: leftmost branch cannot be read-only "
+               printk(KERN_ERR "unionfs: leftmost branch cannot be read-only "
                       "(use \"remount,ro\" to create a read-only union)\n");
                err = -EINVAL;
                goto out_release;
@@ -766,7 +769,7 @@ out_no_change:
        atomic_set(&UNIONFS_D(sb->s_root)->generation, i);
        atomic_set(&UNIONFS_I(sb->s_root->d_inode)->generation, i);
        if (!(*flags & MS_SILENT))
-               printk("unionfs: new generation number %d\n", i);
+               pr_info("unionfs: new generation number %d\n", i);
        /* finally, update the root dentry's times */
        unionfs_copy_attr_times(sb->s_root->d_inode);
        err = 0;                /* reset to success */