From 09b4b8d0691ca5ad491a2affe8a705b1a3b5584e Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 27 Apr 2016 01:12:24 -0400 Subject: [PATCH] add patch remove-trailing-newlines --- remove-trailing-newlines | 145 +++++++++++++++++++++++++++++++++++++++++++++++ series | 2 + timestamps | 6 +- 3 files changed, 150 insertions(+), 3 deletions(-) create mode 100644 remove-trailing-newlines diff --git a/remove-trailing-newlines b/remove-trailing-newlines new file mode 100644 index 00000000..2eecee8a --- /dev/null +++ b/remove-trailing-newlines @@ -0,0 +1,145 @@ +ext4: remove trailing \n from ext4_warning/ext4_error calls + +From: Jakub Wilk + +Messages passed to ext4_warning() or ext4_error() don't need trailing +newlines, because these function add the newlines themselves. + +Signed-off-by: Jakub Wilk +--- + fs/ext4/extents.c | 4 ++-- + fs/ext4/extents_status.c | 2 +- + fs/ext4/file.c | 2 +- + fs/ext4/inline.c | 2 +- + fs/ext4/mballoc.c | 2 +- + fs/ext4/mmp.c | 4 ++-- + fs/ext4/namei.c | 2 +- + fs/ext4/resize.c | 2 +- + 8 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c +index 95bf467..d09855b 100644 +--- a/fs/ext4/extents.c ++++ b/fs/ext4/extents.c +@@ -2583,7 +2583,7 @@ static int ext4_remove_blocks(handle_t *handle, struct inode *inode, + } + } else + ext4_error(sbi->s_sb, "strange request: removal(2) " +- "%u-%u from %u:%u\n", ++ "%u-%u from %u:%u", + from, to, le32_to_cpu(ex->ee_block), ee_len); + return 0; + } +@@ -3738,7 +3738,7 @@ static int ext4_convert_unwritten_extents_endio(handle_t *handle, + if (ee_block != map->m_lblk || ee_len > map->m_len) { + #ifdef EXT4_DEBUG + ext4_warning("Inode (%ld) finished: extent logical block %llu," +- " len %u; IO logical block %llu, len %u\n", ++ " len %u; IO logical block %llu, len %u", + inode->i_ino, (unsigned long long)ee_block, ee_len, + (unsigned long long)map->m_lblk, map->m_len); + #endif +diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c +index e38b987a..37e0592 100644 +--- a/fs/ext4/extents_status.c ++++ b/fs/ext4/extents_status.c +@@ -707,7 +707,7 @@ int ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk, + (status & EXTENT_STATUS_WRITTEN)) { + ext4_warning(inode->i_sb, "Inserting extent [%u/%u] as " + " delayed and written which can potentially " +- " cause data loss.\n", lblk, len); ++ " cause data loss.", lblk, len); + WARN_ON(1); + } + +diff --git a/fs/ext4/file.c b/fs/ext4/file.c +index fa2208b..3e850b9 100644 +--- a/fs/ext4/file.c ++++ b/fs/ext4/file.c +@@ -378,7 +378,7 @@ static int ext4_file_open(struct inode * inode, struct file * filp) + if (ext4_encrypted_inode(d_inode(dir)) && + !ext4_is_child_context_consistent_with_parent(d_inode(dir), inode)) { + ext4_warning(inode->i_sb, +- "Inconsistent encryption contexts: %lu/%lu\n", ++ "Inconsistent encryption contexts: %lu/%lu", + (unsigned long) d_inode(dir)->i_ino, + (unsigned long) inode->i_ino); + dput(dir); +diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c +index 7bc6c85..ff7538c 100644 +--- a/fs/ext4/inline.c ++++ b/fs/ext4/inline.c +@@ -1780,7 +1780,7 @@ int empty_inline_dir(struct inode *dir, int *has_inline_data) + ext4_warning(dir->i_sb, + "bad inline directory (dir #%lu) - " + "inode %u, rec_len %u, name_len %d" +- "inline size %d\n", ++ "inline size %d", + dir->i_ino, le32_to_cpu(de->inode), + le16_to_cpu(de->rec_len), de->name_len, + inline_size); +diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c +index eeeade7..efa111a 100644 +--- a/fs/ext4/mballoc.c ++++ b/fs/ext4/mballoc.c +@@ -4935,7 +4935,7 @@ int ext4_group_add_blocks(handle_t *handle, struct super_block *sb, + * boundary. + */ + if (bit + count > EXT4_BLOCKS_PER_GROUP(sb)) { +- ext4_warning(sb, "too much blocks added to group %u\n", ++ ext4_warning(sb, "too much blocks added to group %u", + block_group); + err = -EINVAL; + goto error_return; +diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c +index 2444527..23d436d 100644 +--- a/fs/ext4/mmp.c ++++ b/fs/ext4/mmp.c +@@ -121,7 +121,7 @@ void __dump_mmp_msg(struct super_block *sb, struct mmp_struct *mmp, + __ext4_warning(sb, function, line, "%s", msg); + __ext4_warning(sb, function, line, + "MMP failure info: last update time: %llu, last update " +- "node: %s, last update device: %s\n", ++ "node: %s, last update device: %s", + (long long unsigned int) le64_to_cpu(mmp->mmp_time), + mmp->mmp_nodename, mmp->mmp_bdevname); + } +@@ -353,7 +353,7 @@ skip: + * wait for MMP interval and check mmp_seq. + */ + if (schedule_timeout_interruptible(HZ * wait_time) != 0) { +- ext4_warning(sb, "MMP startup interrupted, failing mount\n"); ++ ext4_warning(sb, "MMP startup interrupted, failing mount"); + goto failed; + } + +diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c +index 48e4b89..9025064 100644 +--- a/fs/ext4/namei.c ++++ b/fs/ext4/namei.c +@@ -1613,7 +1613,7 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsi + if (nokey) + return ERR_PTR(-ENOKEY); + ext4_warning(inode->i_sb, +- "Inconsistent encryption contexts: %lu/%lu\n", ++ "Inconsistent encryption contexts: %lu/%lu", + (unsigned long) dir->i_ino, + (unsigned long) inode->i_ino); + return ERR_PTR(-EPERM); +diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c +index 34038e3..cf68100 100644 +--- a/fs/ext4/resize.c ++++ b/fs/ext4/resize.c +@@ -41,7 +41,7 @@ int ext4_resize_begin(struct super_block *sb) + */ + if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) { + ext4_warning(sb, "There are errors in the filesystem, " +- "so online resizing is not allowed\n"); ++ "so online resizing is not allowed"); + return -EPERM; + } + +-- +2.8.0.rc3 + + diff --git a/series b/series index 7e055fd6..56cb2fa0 100644 --- a/series +++ b/series @@ -13,6 +13,8 @@ handle-unwritten-or-delalloc-buffers-before-enabling-per-file-data-journaling #fix-races-between-changing-journal-mode-and-ext4_writepages #reenable-per-file-data-journalling-and-delalloc +remove-trailing-newlines + ########################################## # unstable patches #################################################### diff --git a/timestamps b/timestamps index 17288994..9bc8b3ad 100755 --- a/timestamps +++ b/timestamps @@ -33,12 +33,12 @@ touch -d @1461473763 fix-data-exposure-after-a-crash touch -d @1461473765 remove-EXT4_STATE_ORDERED_MODE touch -d @1461473767 add-support-for-avoiding-data-writes-during-transaction-commits touch -d @1461473768 do-not-ask-jbd2-to-write-data-for-delalloc-buffers -touch -d @1461473769 refuse-O_DIRECT-opens-for-modes-where-DIO-doesnt-work touch -d @1461640397 fix-jbd2-txn-extension-in-ext4_ext_truncate_extend_restart touch -d @1461640860 handle-unwritten-or-delalloc-buffers-before-enabling-per-file-data-journaling touch -d @1461640955 fix-races-between-changing-journal-mode-and-ext4_writepages touch -d @1461641327 reenable-per-file-data-journalling-and-delalloc -touch -d @1461641368 series touch -d @1461641387 stable-boundary -touch -d @1461733673 status touch -d @1461733707 timestamps +touch -d @1461733812 status +touch -d @1461733881 remove-trailing-newlines +touch -d @1461733932 series -- 2.11.4.GIT