Commit 06f4abf6 authored by Ryusuke Konishi's avatar Ryusuke Konishi Committed by Linus Torvalds

nilfs2: do not emit extra newline on nilfs_warning() and nilfs_error()

This updates call sites of nilfs_warning() and nilfs_error() so that they
don't add a duplicate newline.  These output functions are already
designed to add a trailing newline to the message.

Link: http://lkml.kernel.org/r/1462886671-3521-2-git-send-email-konishi.ryusuke@lab.ntt.co.jpSigned-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent facb9ec5
...@@ -619,7 +619,7 @@ void nilfs_palloc_commit_free_entry(struct inode *inode, ...@@ -619,7 +619,7 @@ void nilfs_palloc_commit_free_entry(struct inode *inode,
if (!nilfs_clear_bit_atomic(lock, group_offset, bitmap)) if (!nilfs_clear_bit_atomic(lock, group_offset, bitmap))
nilfs_warning(inode->i_sb, __func__, nilfs_warning(inode->i_sb, __func__,
"entry number %llu already freed: ino=%lu\n", "entry number %llu already freed: ino=%lu",
(unsigned long long)req->pr_entry_nr, (unsigned long long)req->pr_entry_nr,
(unsigned long)inode->i_ino); (unsigned long)inode->i_ino);
else else
...@@ -660,7 +660,7 @@ void nilfs_palloc_abort_alloc_entry(struct inode *inode, ...@@ -660,7 +660,7 @@ void nilfs_palloc_abort_alloc_entry(struct inode *inode,
if (!nilfs_clear_bit_atomic(lock, group_offset, bitmap)) if (!nilfs_clear_bit_atomic(lock, group_offset, bitmap))
nilfs_warning(inode->i_sb, __func__, nilfs_warning(inode->i_sb, __func__,
"entry number %llu already freed: ino=%lu\n", "entry number %llu already freed: ino=%lu",
(unsigned long long)req->pr_entry_nr, (unsigned long long)req->pr_entry_nr,
(unsigned long)inode->i_ino); (unsigned long)inode->i_ino);
else else
...@@ -769,7 +769,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems) ...@@ -769,7 +769,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
if (!nilfs_clear_bit_atomic(lock, group_offset, if (!nilfs_clear_bit_atomic(lock, group_offset,
bitmap)) { bitmap)) {
nilfs_warning(inode->i_sb, __func__, nilfs_warning(inode->i_sb, __func__,
"entry number %llu already freed: ino=%lu\n", "entry number %llu already freed: ino=%lu",
(unsigned long long)entry_nrs[j], (unsigned long long)entry_nrs[j],
(unsigned long)inode->i_ino); (unsigned long)inode->i_ino);
} else { } else {
...@@ -814,7 +814,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems) ...@@ -814,7 +814,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
last_nrs[k]); last_nrs[k]);
if (ret && ret != -ENOENT) { if (ret && ret != -ENOENT) {
nilfs_warning(inode->i_sb, __func__, nilfs_warning(inode->i_sb, __func__,
"failed to delete block of entry %llu: ino=%lu, err=%d\n", "failed to delete block of entry %llu: ino=%lu, err=%d",
(unsigned long long)last_nrs[k], (unsigned long long)last_nrs[k],
(unsigned long)inode->i_ino, ret); (unsigned long)inode->i_ino, ret);
} }
...@@ -833,7 +833,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems) ...@@ -833,7 +833,7 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems)
ret = nilfs_palloc_delete_bitmap_block(inode, group); ret = nilfs_palloc_delete_bitmap_block(inode, group);
if (ret && ret != -ENOENT) { if (ret && ret != -ENOENT) {
nilfs_warning(inode->i_sb, __func__, nilfs_warning(inode->i_sb, __func__,
"failed to delete bitmap block of group %lu: ino=%lu, err=%d\n", "failed to delete bitmap block of group %lu: ino=%lu, err=%d",
group, group,
(unsigned long)inode->i_ino, ret); (unsigned long)inode->i_ino, ret);
} }
......
...@@ -42,7 +42,7 @@ static int nilfs_bmap_convert_error(struct nilfs_bmap *bmap, ...@@ -42,7 +42,7 @@ static int nilfs_bmap_convert_error(struct nilfs_bmap *bmap,
if (err == -EINVAL) { if (err == -EINVAL) {
nilfs_error(inode->i_sb, fname, nilfs_error(inode->i_sb, fname,
"broken bmap (inode number=%lu)\n", inode->i_ino); "broken bmap (inode number=%lu)", inode->i_ino);
err = -EIO; err = -EIO;
} }
return err; return err;
......
...@@ -628,8 +628,8 @@ int nilfs_empty_dir(struct inode *inode) ...@@ -628,8 +628,8 @@ int nilfs_empty_dir(struct inode *inode)
while ((char *)de <= kaddr) { while ((char *)de <= kaddr) {
if (de->rec_len == 0) { if (de->rec_len == 0) {
nilfs_error(inode->i_sb, __func__, nilfs_error(inode->i_sb, __func__,
"zero-length directory entry " "zero-length directory entry (kaddr=%p, de=%p)",
"(kaddr=%p, de=%p)\n", kaddr, de); kaddr, de);
goto not_empty; goto not_empty;
} }
if (de->inode != 0) { if (de->inode != 0) {
......
...@@ -921,7 +921,7 @@ int nilfs_set_file_dirty(struct inode *inode, unsigned nr_dirty) ...@@ -921,7 +921,7 @@ int nilfs_set_file_dirty(struct inode *inode, unsigned nr_dirty)
/* This will happen when somebody is freeing /* This will happen when somebody is freeing
this inode. */ this inode. */
nilfs_warning(inode->i_sb, __func__, nilfs_warning(inode->i_sb, __func__,
"cannot get inode (ino=%lu)\n", "cannot get inode (ino=%lu)",
inode->i_ino); inode->i_ino);
spin_unlock(&nilfs->ns_inode_lock); spin_unlock(&nilfs->ns_inode_lock);
return -EINVAL; /* NILFS_I_DIRTY may remain for return -EINVAL; /* NILFS_I_DIRTY may remain for
...@@ -942,7 +942,7 @@ int __nilfs_mark_inode_dirty(struct inode *inode, int flags) ...@@ -942,7 +942,7 @@ int __nilfs_mark_inode_dirty(struct inode *inode, int flags)
err = nilfs_load_inode_block(inode, &ibh); err = nilfs_load_inode_block(inode, &ibh);
if (unlikely(err)) { if (unlikely(err)) {
nilfs_warning(inode->i_sb, __func__, nilfs_warning(inode->i_sb, __func__,
"failed to reget inode block.\n"); "failed to reget inode block.");
return err; return err;
} }
nilfs_update_inode(inode, ibh, flags); nilfs_update_inode(inode, ibh, flags);
...@@ -969,7 +969,7 @@ void nilfs_dirty_inode(struct inode *inode, int flags) ...@@ -969,7 +969,7 @@ void nilfs_dirty_inode(struct inode *inode, int flags)
if (is_bad_inode(inode)) { if (is_bad_inode(inode)) {
nilfs_warning(inode->i_sb, __func__, nilfs_warning(inode->i_sb, __func__,
"tried to mark bad_inode dirty. ignored.\n"); "tried to mark bad_inode dirty. ignored.");
dump_stack(); dump_stack();
return; return;
} }
......
...@@ -284,7 +284,7 @@ static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry) ...@@ -284,7 +284,7 @@ static int nilfs_do_unlink(struct inode *dir, struct dentry *dentry)
if (!inode->i_nlink) { if (!inode->i_nlink) {
nilfs_warning(inode->i_sb, __func__, nilfs_warning(inode->i_sb, __func__,
"deleting nonexistent file (%lu), %d\n", "deleting nonexistent file (%lu), %d",
inode->i_ino, inode->i_nlink); inode->i_ino, inode->i_nlink);
set_nlink(inode, 1); set_nlink(inode, 1);
} }
......
...@@ -1938,7 +1938,7 @@ static int nilfs_segctor_collect_dirty_files(struct nilfs_sc_info *sci, ...@@ -1938,7 +1938,7 @@ static int nilfs_segctor_collect_dirty_files(struct nilfs_sc_info *sci,
ifile, ii->vfs_inode.i_ino, &ibh); ifile, ii->vfs_inode.i_ino, &ibh);
if (unlikely(err)) { if (unlikely(err)) {
nilfs_warning(sci->sc_super, __func__, nilfs_warning(sci->sc_super, __func__,
"failed to get inode block.\n"); "failed to get inode block.");
return err; return err;
} }
mark_buffer_dirty(ibh); mark_buffer_dirty(ibh);
...@@ -2724,13 +2724,13 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci) ...@@ -2724,13 +2724,13 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci)
if (!list_empty(&sci->sc_dirty_files)) { if (!list_empty(&sci->sc_dirty_files)) {
nilfs_warning(sci->sc_super, __func__, nilfs_warning(sci->sc_super, __func__,
"dirty file(s) after the final construction\n"); "dirty file(s) after the final construction");
nilfs_dispose_list(nilfs, &sci->sc_dirty_files, 1); nilfs_dispose_list(nilfs, &sci->sc_dirty_files, 1);
} }
if (!list_empty(&sci->sc_iput_queue)) { if (!list_empty(&sci->sc_iput_queue)) {
nilfs_warning(sci->sc_super, __func__, nilfs_warning(sci->sc_super, __func__,
"iput queue is not empty\n"); "iput queue is not empty");
nilfs_dispose_list(nilfs, &sci->sc_iput_queue, 1); nilfs_dispose_list(nilfs, &sci->sc_iput_queue, 1);
} }
...@@ -2807,7 +2807,7 @@ void nilfs_detach_log_writer(struct super_block *sb) ...@@ -2807,7 +2807,7 @@ void nilfs_detach_log_writer(struct super_block *sb)
if (!list_empty(&nilfs->ns_dirty_files)) { if (!list_empty(&nilfs->ns_dirty_files)) {
list_splice_init(&nilfs->ns_dirty_files, &garbage_list); list_splice_init(&nilfs->ns_dirty_files, &garbage_list);
nilfs_warning(sb, __func__, nilfs_warning(sb, __func__,
"Hit dirty file after stopped log writer\n"); "Hit dirty file after stopped log writer");
} }
spin_unlock(&nilfs->ns_inode_lock); spin_unlock(&nilfs->ns_inode_lock);
up_write(&nilfs->ns_segctor_sem); up_write(&nilfs->ns_segctor_sem);
......
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