aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-10-10 04:08:04 -0400
committerJan Kara <jack@suse.cz>2011-10-10 13:29:01 -0400
commita40ecd7b3ccf520ff02da93e8d1ba6cd55c2e359 (patch)
treedd5e340a20c85f7962a4e7861854e066586d1d02 /fs/udf/super.c
parent8076c363da15e7c35a4094974d1b4bcc196b5fa9 (diff)
udf: Rename udf_warning to udf_warn
Rename udf_warning to udf_warn for consistency with normal logging uses of pr_warn. Rename function udf_warning to _udf_warn. Remove __func__ from uses and move __func__ to a new udf_warn macro that calls _udf_warn. Add \n's to uses of udf_warn, remove \n from _udf_warn. Coalesce formats. Reviewed-by: NamJae Jeon <linkinjeon@gmail.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r--fs/udf/super.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 76cc08f9202e..622331f1290d 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -855,13 +855,11 @@ static int udf_load_metadata_files(struct super_block *sb, int partition)
855 mdata->s_metadata_fe = udf_iget(sb, &addr); 855 mdata->s_metadata_fe = udf_iget(sb, &addr);
856 856
857 if (mdata->s_metadata_fe == NULL) { 857 if (mdata->s_metadata_fe == NULL) {
858 udf_warning(sb, __func__, "metadata inode efe not found, " 858 udf_warn(sb, "metadata inode efe not found, will try mirror inode\n");
859 "will try mirror inode.");
860 fe_error = 1; 859 fe_error = 1;
861 } else if (UDF_I(mdata->s_metadata_fe)->i_alloc_type != 860 } else if (UDF_I(mdata->s_metadata_fe)->i_alloc_type !=
862 ICBTAG_FLAG_AD_SHORT) { 861 ICBTAG_FLAG_AD_SHORT) {
863 udf_warning(sb, __func__, "metadata inode efe does not have " 862 udf_warn(sb, "metadata inode efe does not have short allocation descriptors!\n");
864 "short allocation descriptors!");
865 fe_error = 1; 863 fe_error = 1;
866 iput(mdata->s_metadata_fe); 864 iput(mdata->s_metadata_fe);
867 mdata->s_metadata_fe = NULL; 865 mdata->s_metadata_fe = NULL;
@@ -881,12 +879,10 @@ static int udf_load_metadata_files(struct super_block *sb, int partition)
881 udf_err(sb, "mirror inode efe not found and metadata inode is missing too, exiting...\n"); 879 udf_err(sb, "mirror inode efe not found and metadata inode is missing too, exiting...\n");
882 goto error_exit; 880 goto error_exit;
883 } else 881 } else
884 udf_warning(sb, __func__, "mirror inode efe not found," 882 udf_warn(sb, "mirror inode efe not found, but metadata inode is OK\n");
885 " but metadata inode is OK");
886 } else if (UDF_I(mdata->s_mirror_fe)->i_alloc_type != 883 } else if (UDF_I(mdata->s_mirror_fe)->i_alloc_type !=
887 ICBTAG_FLAG_AD_SHORT) { 884 ICBTAG_FLAG_AD_SHORT) {
888 udf_warning(sb, __func__, "mirror inode efe does not have " 885 udf_warn(sb, "mirror inode efe does not have short allocation descriptors!\n");
889 "short allocation descriptors!");
890 iput(mdata->s_mirror_fe); 886 iput(mdata->s_mirror_fe);
891 mdata->s_mirror_fe = NULL; 887 mdata->s_mirror_fe = NULL;
892 if (fe_error) 888 if (fe_error)
@@ -909,9 +905,7 @@ static int udf_load_metadata_files(struct super_block *sb, int partition)
909 905
910 if (mdata->s_bitmap_fe == NULL) { 906 if (mdata->s_bitmap_fe == NULL) {
911 if (sb->s_flags & MS_RDONLY) 907 if (sb->s_flags & MS_RDONLY)
912 udf_warning(sb, __func__, "bitmap inode efe " 908 udf_warn(sb, "bitmap inode efe not found but it's ok since the disc is mounted read-only\n");
913 "not found but it's ok since the disc"
914 " is mounted read-only");
915 else { 909 else {
916 udf_err(sb, "bitmap inode efe not found and attempted read-write mount\n"); 910 udf_err(sb, "bitmap inode efe not found and attempted read-write mount\n");
917 goto error_exit; 911 goto error_exit;
@@ -2105,15 +2099,15 @@ void _udf_err(struct super_block *sb, const char *function,
2105 sb->s_id, function, error_buf); 2099 sb->s_id, function, error_buf);
2106} 2100}
2107 2101
2108void udf_warning(struct super_block *sb, const char *function, 2102void _udf_warn(struct super_block *sb, const char *function,
2109 const char *fmt, ...) 2103 const char *fmt, ...)
2110{ 2104{
2111 va_list args; 2105 va_list args;
2112 2106
2113 va_start(args, fmt); 2107 va_start(args, fmt);
2114 vsnprintf(error_buf, sizeof(error_buf), fmt, args); 2108 vsnprintf(error_buf, sizeof(error_buf), fmt, args);
2115 va_end(args); 2109 va_end(args);
2116 printk(KERN_WARNING "UDF-fs warning (device %s): %s: %s\n", 2110 printk(KERN_WARNING "UDF-fs warning (device %s): %s: %s",
2117 sb->s_id, function, error_buf); 2111 sb->s_id, function, error_buf);
2118} 2112}
2119 2113