Commit d1727d55 authored by Joe Perches's avatar Joe Perches Committed by Namjae Jeon

exfat: Use a more common logging style

Remove the direct use of KERN_<LEVEL> in functions by creating
separate exfat_<level> macros.

Miscellanea:

o Remove several unnecessary terminating newlines in formats
o Realign arguments and fit to 80 columns where appropriate
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
parent 197298a6
...@@ -58,9 +58,8 @@ static int exfat_allocate_bitmap(struct super_block *sb, ...@@ -58,9 +58,8 @@ static int exfat_allocate_bitmap(struct super_block *sb,
need_map_size = ((EXFAT_DATA_CLUSTER_COUNT(sbi) - 1) / BITS_PER_BYTE) need_map_size = ((EXFAT_DATA_CLUSTER_COUNT(sbi) - 1) / BITS_PER_BYTE)
+ 1; + 1;
if (need_map_size != map_size) { if (need_map_size != map_size) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "bogus allocation bitmap size(need : %u, cur : %lld)",
"bogus allocation bitmap size(need : %u, cur : %lld)", need_map_size, map_size);
need_map_size, map_size);
/* /*
* Only allowed when bogus allocation * Only allowed when bogus allocation
* bitmap size is large * bitmap size is large
...@@ -192,8 +191,7 @@ void exfat_clear_bitmap(struct inode *inode, unsigned int clu) ...@@ -192,8 +191,7 @@ void exfat_clear_bitmap(struct inode *inode, unsigned int clu)
(1 << sbi->sect_per_clus_bits), GFP_NOFS, 0); (1 << sbi->sect_per_clus_bits), GFP_NOFS, 0);
if (ret_discard == -EOPNOTSUPP) { if (ret_discard == -EOPNOTSUPP) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "discard not supported by device, disabling");
"discard not supported by device, disabling");
opts->discard = 0; opts->discard = 0;
} }
} }
......
...@@ -720,9 +720,8 @@ static int exfat_dir_readahead(struct super_block *sb, sector_t sec) ...@@ -720,9 +720,8 @@ static int exfat_dir_readahead(struct super_block *sb, sector_t sec)
return 0; return 0;
if (sec < sbi->data_start_sector) { if (sec < sbi->data_start_sector) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "requested sector is invalid(sect:%llu, root:%llu)",
"requested sector is invalid(sect:%llu, root:%llu)", (unsigned long long)sec, sbi->data_start_sector);
(unsigned long long)sec, sbi->data_start_sector);
return -EIO; return -EIO;
} }
...@@ -750,7 +749,7 @@ struct exfat_dentry *exfat_get_dentry(struct super_block *sb, ...@@ -750,7 +749,7 @@ struct exfat_dentry *exfat_get_dentry(struct super_block *sb,
sector_t sec; sector_t sec;
if (p_dir->dir == DIR_DELETED) { if (p_dir->dir == DIR_DELETED) {
exfat_msg(sb, KERN_ERR, "abnormal access to deleted dentry\n"); exfat_err(sb, "abnormal access to deleted dentry");
return NULL; return NULL;
} }
...@@ -853,7 +852,7 @@ struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb, ...@@ -853,7 +852,7 @@ struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb,
struct buffer_head *bh; struct buffer_head *bh;
if (p_dir->dir == DIR_DELETED) { if (p_dir->dir == DIR_DELETED) {
exfat_msg(sb, KERN_ERR, "access to deleted dentry\n"); exfat_err(sb, "access to deleted dentry");
return NULL; return NULL;
} }
......
...@@ -505,6 +505,13 @@ void __exfat_fs_error(struct super_block *sb, int report, const char *fmt, ...) ...@@ -505,6 +505,13 @@ void __exfat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
fmt, ## args) fmt, ## args)
void exfat_msg(struct super_block *sb, const char *lv, const char *fmt, ...) void exfat_msg(struct super_block *sb, const char *lv, const char *fmt, ...)
__printf(3, 4) __cold; __printf(3, 4) __cold;
#define exfat_err(sb, fmt, ...) \
exfat_msg(sb, KERN_ERR, fmt, ##__VA_ARGS__)
#define exfat_warn(sb, fmt, ...) \
exfat_msg(sb, KERN_WARNING, fmt, ##__VA_ARGS__)
#define exfat_info(sb, fmt, ...) \
exfat_msg(sb, KERN_INFO, fmt, ##__VA_ARGS__)
void exfat_get_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts, void exfat_get_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts,
u8 tz, __le16 time, __le16 date, u8 time_ms); u8 tz, __le16 time, __le16 date, u8 time_ms);
void exfat_truncate_atime(struct timespec64 *ts); void exfat_truncate_atime(struct timespec64 *ts);
......
...@@ -170,8 +170,7 @@ int exfat_free_cluster(struct inode *inode, struct exfat_chain *p_chain) ...@@ -170,8 +170,7 @@ int exfat_free_cluster(struct inode *inode, struct exfat_chain *p_chain)
/* check cluster validation */ /* check cluster validation */
if (p_chain->dir < 2 && p_chain->dir >= sbi->num_clusters) { if (p_chain->dir < 2 && p_chain->dir >= sbi->num_clusters) {
exfat_msg(sb, KERN_ERR, "invalid start cluster (%u)", exfat_err(sb, "invalid start cluster (%u)", p_chain->dir);
p_chain->dir);
return -EIO; return -EIO;
} }
...@@ -305,8 +304,7 @@ int exfat_zeroed_cluster(struct inode *dir, unsigned int clu) ...@@ -305,8 +304,7 @@ int exfat_zeroed_cluster(struct inode *dir, unsigned int clu)
return 0; return 0;
release_bhs: release_bhs:
exfat_msg(sb, KERN_ERR, "failed zeroed sect %llu\n", exfat_err(sb, "failed zeroed sect %llu\n", (unsigned long long)blknr);
(unsigned long long)blknr);
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
bforget(bhs[i]); bforget(bhs[i]);
return err; return err;
...@@ -337,9 +335,8 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc, ...@@ -337,9 +335,8 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc,
/* find new cluster */ /* find new cluster */
if (hint_clu == EXFAT_EOF_CLUSTER) { if (hint_clu == EXFAT_EOF_CLUSTER) {
if (sbi->clu_srch_ptr < EXFAT_FIRST_CLUSTER) { if (sbi->clu_srch_ptr < EXFAT_FIRST_CLUSTER) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "sbi->clu_srch_ptr is invalid (%u)\n",
"sbi->clu_srch_ptr is invalid (%u)\n", sbi->clu_srch_ptr);
sbi->clu_srch_ptr);
sbi->clu_srch_ptr = EXFAT_FIRST_CLUSTER; sbi->clu_srch_ptr = EXFAT_FIRST_CLUSTER;
} }
...@@ -350,7 +347,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc, ...@@ -350,7 +347,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc,
/* check cluster validation */ /* check cluster validation */
if (hint_clu < EXFAT_FIRST_CLUSTER && hint_clu >= sbi->num_clusters) { if (hint_clu < EXFAT_FIRST_CLUSTER && hint_clu >= sbi->num_clusters) {
exfat_msg(sb, KERN_ERR, "hint_cluster is invalid (%u)\n", exfat_err(sb, "hint_cluster is invalid (%u)",
hint_clu); hint_clu);
hint_clu = EXFAT_FIRST_CLUSTER; hint_clu = EXFAT_FIRST_CLUSTER;
if (p_chain->flags == ALLOC_NO_FAT_CHAIN) { if (p_chain->flags == ALLOC_NO_FAT_CHAIN) {
......
...@@ -32,7 +32,7 @@ void __exfat_fs_error(struct super_block *sb, int report, const char *fmt, ...) ...@@ -32,7 +32,7 @@ void __exfat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
va_start(args, fmt); va_start(args, fmt);
vaf.fmt = fmt; vaf.fmt = fmt;
vaf.va = &args; vaf.va = &args;
exfat_msg(sb, KERN_ERR, "error, %pV\n", &vaf); exfat_err(sb, "error, %pV", &vaf);
va_end(args); va_end(args);
} }
...@@ -41,7 +41,7 @@ void __exfat_fs_error(struct super_block *sb, int report, const char *fmt, ...) ...@@ -41,7 +41,7 @@ void __exfat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
sb->s_id); sb->s_id);
} else if (opts->errors == EXFAT_ERRORS_RO && !sb_rdonly(sb)) { } else if (opts->errors == EXFAT_ERRORS_RO && !sb_rdonly(sb)) {
sb->s_flags |= SB_RDONLY; sb->s_flags |= SB_RDONLY;
exfat_msg(sb, KERN_ERR, "Filesystem has been set read-only"); exfat_err(sb, "Filesystem has been set read-only");
} }
} }
......
...@@ -773,8 +773,8 @@ static struct dentry *exfat_lookup(struct inode *dir, struct dentry *dentry, ...@@ -773,8 +773,8 @@ static struct dentry *exfat_lookup(struct inode *dir, struct dentry *dentry,
if (d_unhashed(alias)) { if (d_unhashed(alias)) {
WARN_ON(alias->d_name.hash_len != WARN_ON(alias->d_name.hash_len !=
dentry->d_name.hash_len); dentry->d_name.hash_len);
exfat_msg(sb, KERN_INFO, exfat_info(sb, "rehashed a dentry(%p) in read lookup",
"rehashed a dentry(%p) in read lookup", alias); alias);
d_drop(dentry); d_drop(dentry);
d_rehash(alias); d_rehash(alias);
} else if (!S_ISDIR(i_mode)) { } else if (!S_ISDIR(i_mode)) {
...@@ -819,7 +819,7 @@ static int exfat_unlink(struct inode *dir, struct dentry *dentry) ...@@ -819,7 +819,7 @@ static int exfat_unlink(struct inode *dir, struct dentry *dentry)
exfat_chain_dup(&cdir, &ei->dir); exfat_chain_dup(&cdir, &ei->dir);
entry = ei->entry; entry = ei->entry;
if (ei->dir.dir == DIR_DELETED) { if (ei->dir.dir == DIR_DELETED) {
exfat_msg(sb, KERN_ERR, "abnormal access to deleted dentry"); exfat_err(sb, "abnormal access to deleted dentry");
err = -ENOENT; err = -ENOENT;
goto unlock; goto unlock;
} }
...@@ -974,7 +974,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -974,7 +974,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry)
entry = ei->entry; entry = ei->entry;
if (ei->dir.dir == DIR_DELETED) { if (ei->dir.dir == DIR_DELETED) {
exfat_msg(sb, KERN_ERR, "abnormal access to deleted dentry"); exfat_err(sb, "abnormal access to deleted dentry");
err = -ENOENT; err = -ENOENT;
goto unlock; goto unlock;
} }
...@@ -986,9 +986,8 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -986,9 +986,8 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry)
err = exfat_check_dir_empty(sb, &clu_to_free); err = exfat_check_dir_empty(sb, &clu_to_free);
if (err) { if (err) {
if (err == -EIO) if (err == -EIO)
exfat_msg(sb, KERN_ERR, exfat_err(sb, "failed to exfat_check_dir_empty : err(%d)",
"failed to exfat_check_dir_empty : err(%d)", err);
err);
goto unlock; goto unlock;
} }
...@@ -1009,9 +1008,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -1009,9 +1008,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry)
err = exfat_remove_entries(dir, &cdir, entry, 0, num_entries); err = exfat_remove_entries(dir, &cdir, entry, 0, num_entries);
if (err) { if (err) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "failed to exfat_remove_entries : err(%d)", err);
"failed to exfat_remove_entries : err(%d)",
err);
goto unlock; goto unlock;
} }
ei->dir.dir = DIR_DELETED; ei->dir.dir = DIR_DELETED;
...@@ -1240,8 +1237,7 @@ static int __exfat_rename(struct inode *old_parent_inode, ...@@ -1240,8 +1237,7 @@ static int __exfat_rename(struct inode *old_parent_inode,
return -EINVAL; return -EINVAL;
if (ei->dir.dir == DIR_DELETED) { if (ei->dir.dir == DIR_DELETED) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "abnormal access to deleted source dentry");
"abnormal access to deleted source dentry");
return -ENOENT; return -ENOENT;
} }
...@@ -1263,8 +1259,7 @@ static int __exfat_rename(struct inode *old_parent_inode, ...@@ -1263,8 +1259,7 @@ static int __exfat_rename(struct inode *old_parent_inode,
new_ei = EXFAT_I(new_inode); new_ei = EXFAT_I(new_inode);
if (new_ei->dir.dir == DIR_DELETED) { if (new_ei->dir.dir == DIR_DELETED) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "abnormal access to deleted target dentry");
"abnormal access to deleted target dentry");
goto out; goto out;
} }
...@@ -1426,8 +1421,7 @@ static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1426,8 +1421,7 @@ static int exfat_rename(struct inode *old_dir, struct dentry *old_dentry,
if (S_ISDIR(new_inode->i_mode)) if (S_ISDIR(new_inode->i_mode))
drop_nlink(new_inode); drop_nlink(new_inode);
} else { } else {
exfat_msg(sb, KERN_WARNING, exfat_warn(sb, "abnormal access to an inode dropped");
"abnormal access to an inode dropped");
WARN_ON(new_inode->i_nlink == 0); WARN_ON(new_inode->i_nlink == 0);
} }
new_inode->i_ctime = EXFAT_I(new_inode)->i_crtime = new_inode->i_ctime = EXFAT_I(new_inode)->i_crtime =
......
...@@ -503,16 +503,14 @@ static int exfat_utf8_to_utf16(struct super_block *sb, ...@@ -503,16 +503,14 @@ static int exfat_utf8_to_utf16(struct super_block *sb,
unilen = utf8s_to_utf16s(p_cstring, len, UTF16_HOST_ENDIAN, unilen = utf8s_to_utf16s(p_cstring, len, UTF16_HOST_ENDIAN,
(wchar_t *)uniname, MAX_NAME_LENGTH + 2); (wchar_t *)uniname, MAX_NAME_LENGTH + 2);
if (unilen < 0) { if (unilen < 0) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "failed to %s (err : %d) nls len : %d",
"failed to %s (err : %d) nls len : %d", __func__, unilen, len);
__func__, unilen, len);
return unilen; return unilen;
} }
if (unilen > MAX_NAME_LENGTH) { if (unilen > MAX_NAME_LENGTH) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "failed to %s (estr:ENAMETOOLONG) nls len : %d, unilen : %d > %d",
"failed to %s (estr:ENAMETOOLONG) nls len : %d, unilen : %d > %d", __func__, len, unilen, MAX_NAME_LENGTH);
__func__, len, unilen, MAX_NAME_LENGTH);
return -ENAMETOOLONG; return -ENAMETOOLONG;
} }
...@@ -687,9 +685,8 @@ static int exfat_load_upcase_table(struct super_block *sb, ...@@ -687,9 +685,8 @@ static int exfat_load_upcase_table(struct super_block *sb,
bh = sb_bread(sb, sector); bh = sb_bread(sb, sector);
if (!bh) { if (!bh) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "failed to read sector(0x%llx)\n",
"failed to read sector(0x%llx)\n", (unsigned long long)sector);
(unsigned long long)sector);
ret = -EIO; ret = -EIO;
goto free_table; goto free_table;
} }
...@@ -722,9 +719,8 @@ static int exfat_load_upcase_table(struct super_block *sb, ...@@ -722,9 +719,8 @@ static int exfat_load_upcase_table(struct super_block *sb,
if (index >= 0xFFFF && utbl_checksum == checksum) if (index >= 0xFFFF && utbl_checksum == checksum)
return 0; return 0;
exfat_msg(sb, KERN_ERR, exfat_err(sb, "failed to load upcase table (idx : 0x%08x, chksum : 0x%08x, utbl_chksum : 0x%08x)",
"failed to load upcase table (idx : 0x%08x, chksum : 0x%08x, utbl_chksum : 0x%08x)\n", index, checksum, utbl_checksum);
index, checksum, utbl_checksum);
ret = -EINVAL; ret = -EINVAL;
free_table: free_table:
exfat_free_upcase_table(sbi); exfat_free_upcase_table(sbi);
......
...@@ -376,15 +376,13 @@ static struct pbr *exfat_read_pbr_with_logical_sector(struct super_block *sb) ...@@ -376,15 +376,13 @@ static struct pbr *exfat_read_pbr_with_logical_sector(struct super_block *sb)
if (!is_power_of_2(logical_sect) || if (!is_power_of_2(logical_sect) ||
logical_sect < 512 || logical_sect > 4096) { logical_sect < 512 || logical_sect > 4096) {
exfat_msg(sb, KERN_ERR, "bogus logical sector size %u", exfat_err(sb, "bogus logical sector size %u", logical_sect);
logical_sect);
return NULL; return NULL;
} }
if (logical_sect < sb->s_blocksize) { if (logical_sect < sb->s_blocksize) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "logical sector size too small for device (logical sector size = %u)",
"logical sector size too small for device (logical sector size = %u)", logical_sect);
logical_sect);
return NULL; return NULL;
} }
...@@ -393,15 +391,14 @@ static struct pbr *exfat_read_pbr_with_logical_sector(struct super_block *sb) ...@@ -393,15 +391,14 @@ static struct pbr *exfat_read_pbr_with_logical_sector(struct super_block *sb)
sbi->pbr_bh = NULL; sbi->pbr_bh = NULL;
if (!sb_set_blocksize(sb, logical_sect)) { if (!sb_set_blocksize(sb, logical_sect)) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "unable to set blocksize %u",
"unable to set blocksize %u", logical_sect); logical_sect);
return NULL; return NULL;
} }
sbi->pbr_bh = sb_bread(sb, 0); sbi->pbr_bh = sb_bread(sb, 0);
if (!sbi->pbr_bh) { if (!sbi->pbr_bh) {
exfat_msg(sb, KERN_ERR, exfat_err(sb, "unable to read boot sector (logical sector size = %lu)",
"unable to read boot sector (logical sector size = %lu)", sb->s_blocksize);
sb->s_blocksize);
return NULL; return NULL;
} }
...@@ -424,7 +421,7 @@ static int __exfat_fill_super(struct super_block *sb) ...@@ -424,7 +421,7 @@ static int __exfat_fill_super(struct super_block *sb)
/* read boot sector */ /* read boot sector */
sbi->pbr_bh = sb_bread(sb, 0); sbi->pbr_bh = sb_bread(sb, 0);
if (!sbi->pbr_bh) { if (!sbi->pbr_bh) {
exfat_msg(sb, KERN_ERR, "unable to read boot sector"); exfat_err(sb, "unable to read boot sector");
return -EIO; return -EIO;
} }
...@@ -433,7 +430,7 @@ static int __exfat_fill_super(struct super_block *sb) ...@@ -433,7 +430,7 @@ static int __exfat_fill_super(struct super_block *sb)
/* check the validity of PBR */ /* check the validity of PBR */
if (le16_to_cpu((p_pbr->signature)) != PBR_SIGNATURE) { if (le16_to_cpu((p_pbr->signature)) != PBR_SIGNATURE) {
exfat_msg(sb, KERN_ERR, "invalid boot record signature"); exfat_err(sb, "invalid boot record signature");
ret = -EINVAL; ret = -EINVAL;
goto free_bh; goto free_bh;
} }
...@@ -458,7 +455,7 @@ static int __exfat_fill_super(struct super_block *sb) ...@@ -458,7 +455,7 @@ static int __exfat_fill_super(struct super_block *sb)
p_bpb = (struct pbr64 *)p_pbr; p_bpb = (struct pbr64 *)p_pbr;
if (!p_bpb->bsx.num_fats) { if (!p_bpb->bsx.num_fats) {
exfat_msg(sb, KERN_ERR, "bogus number of FAT structure"); exfat_err(sb, "bogus number of FAT structure");
ret = -EINVAL; ret = -EINVAL;
goto free_bh; goto free_bh;
} }
...@@ -488,8 +485,7 @@ static int __exfat_fill_super(struct super_block *sb) ...@@ -488,8 +485,7 @@ static int __exfat_fill_super(struct super_block *sb)
if (le16_to_cpu(p_bpb->bsx.vol_flags) & VOL_DIRTY) { if (le16_to_cpu(p_bpb->bsx.vol_flags) & VOL_DIRTY) {
sbi->vol_flag |= VOL_DIRTY; sbi->vol_flag |= VOL_DIRTY;
exfat_msg(sb, KERN_WARNING, exfat_warn(sb, "Volume was not properly unmounted. Some data may be corrupt. Please run fsck.");
"Volume was not properly unmounted. Some data may be corrupt. Please run fsck.");
} }
/* exFAT file size is limited by a disk volume size */ /* exFAT file size is limited by a disk volume size */
...@@ -498,19 +494,19 @@ static int __exfat_fill_super(struct super_block *sb) ...@@ -498,19 +494,19 @@ static int __exfat_fill_super(struct super_block *sb)
ret = exfat_create_upcase_table(sb); ret = exfat_create_upcase_table(sb);
if (ret) { if (ret) {
exfat_msg(sb, KERN_ERR, "failed to load upcase table"); exfat_err(sb, "failed to load upcase table");
goto free_bh; goto free_bh;
} }
ret = exfat_load_bitmap(sb); ret = exfat_load_bitmap(sb);
if (ret) { if (ret) {
exfat_msg(sb, KERN_ERR, "failed to load alloc-bitmap"); exfat_err(sb, "failed to load alloc-bitmap");
goto free_upcase_table; goto free_upcase_table;
} }
ret = exfat_count_used_clusters(sb, &sbi->used_clusters); ret = exfat_count_used_clusters(sb, &sbi->used_clusters);
if (ret) { if (ret) {
exfat_msg(sb, KERN_ERR, "failed to scan clusters"); exfat_err(sb, "failed to scan clusters");
goto free_alloc_bitmap; goto free_alloc_bitmap;
} }
...@@ -539,8 +535,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc) ...@@ -539,8 +535,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
struct request_queue *q = bdev_get_queue(sb->s_bdev); struct request_queue *q = bdev_get_queue(sb->s_bdev);
if (!blk_queue_discard(q)) { if (!blk_queue_discard(q)) {
exfat_msg(sb, KERN_WARNING, exfat_warn(sb, "mounting with \"discard\" option, but the device does not support discard");
"mounting with \"discard\" option, but the device does not support discard");
opts->discard = 0; opts->discard = 0;
} }
} }
...@@ -555,7 +550,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc) ...@@ -555,7 +550,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
err = __exfat_fill_super(sb); err = __exfat_fill_super(sb);
if (err) { if (err) {
exfat_msg(sb, KERN_ERR, "failed to recognize exfat type"); exfat_err(sb, "failed to recognize exfat type");
goto check_nls_io; goto check_nls_io;
} }
...@@ -567,8 +562,8 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc) ...@@ -567,8 +562,8 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
else { else {
sbi->nls_io = load_nls(sbi->options.iocharset); sbi->nls_io = load_nls(sbi->options.iocharset);
if (!sbi->nls_io) { if (!sbi->nls_io) {
exfat_msg(sb, KERN_ERR, "IO charset %s not found", exfat_err(sb, "IO charset %s not found",
sbi->options.iocharset); sbi->options.iocharset);
err = -EINVAL; err = -EINVAL;
goto free_table; goto free_table;
} }
...@@ -581,7 +576,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc) ...@@ -581,7 +576,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
root_inode = new_inode(sb); root_inode = new_inode(sb);
if (!root_inode) { if (!root_inode) {
exfat_msg(sb, KERN_ERR, "failed to allocate root inode."); exfat_err(sb, "failed to allocate root inode");
err = -ENOMEM; err = -ENOMEM;
goto free_table; goto free_table;
} }
...@@ -590,7 +585,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc) ...@@ -590,7 +585,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
inode_set_iversion(root_inode, 1); inode_set_iversion(root_inode, 1);
err = exfat_read_root(root_inode); err = exfat_read_root(root_inode);
if (err) { if (err) {
exfat_msg(sb, KERN_ERR, "failed to initialize root inode."); exfat_err(sb, "failed to initialize root inode");
goto put_inode; goto put_inode;
} }
...@@ -599,7 +594,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc) ...@@ -599,7 +594,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
sb->s_root = d_make_root(root_inode); sb->s_root = d_make_root(root_inode);
if (!sb->s_root) { if (!sb->s_root) {
exfat_msg(sb, KERN_ERR, "failed to get the root dentry"); exfat_err(sb, "failed to get the root dentry");
err = -ENOMEM; err = -ENOMEM;
goto put_inode; goto put_inode;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment