lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  6 Jul 2021 20:39:00 +0200
From:   Jan Gruber <j4n6ru@...il.com>
To:     tytso@....edu, adilger.kernel@...ger.ca
Cc:     trivial@...nel.org, linux-ext4@...r.kernel.org,
        linux-kernel@...r.kernel.org, Jan Gruber <j4n6ru@...il.com>
Subject: [PATCH] ext4: Fix comments and spaces to follow coding style

This commit addresses two whitespace issues as well as
instances of the following coding style issue regarding
block comments, which were identified by checkpatch.pl:

"WARNING: Block comments use a trailing */ on a separate line"

The changes aim at making the code more pleasant to read
and to eliminate warnings

Signed-off-by: Jan Gruber <j4n6ru@...il.com>
---
 fs/ext4/super.c | 55 ++++++++++++++++++++++++++++++++-----------------
 1 file changed, 36 insertions(+), 19 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 9b2e8fc86346..5250c7debbad 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -514,7 +514,7 @@ static int ext4_journalled_submit_inode_data_buffers(struct jbd2_inode *jinode)
 		.nr_to_write = LONG_MAX,
 		.range_start = jinode->i_dirty_start,
 		.range_end = jinode->i_dirty_end,
-        };
+	};
 
 	return write_cache_pages(mapping, &wbc,
 				 ext4_journalled_writepage_callback,
@@ -850,9 +850,11 @@ const char *ext4_decode_error(struct super_block *sb, int errno,
 			errstr = "Readonly filesystem";
 		break;
 	default:
-		/* If the caller passed in an extra buffer for unknown
+		/*
+		 * If the caller passed in an extra buffer for unknown
 		 * errors, textualise them now.  Else we just return
-		 * NULL. */
+		 * NULL.
+		 */
 		if (nbuf) {
 			/* Check for truncated error codes... */
 			if (snprintf(nbuf, 16, "error %d", -errno) >= 0)
@@ -864,8 +866,10 @@ const char *ext4_decode_error(struct super_block *sb, int errno,
 	return errstr;
 }
 
-/* __ext4_std_error decodes expected errors from journaling functions
- * automatically and invokes the appropriate error response.  */
+/*
+ * __ext4_std_error decodes expected errors from journaling functions
+ * automatically and invokes the appropriate error response.
+ */
 
 void __ext4_std_error(struct super_block *sb, const char *function,
 		      unsigned int line, int errno)
@@ -876,9 +880,11 @@ void __ext4_std_error(struct super_block *sb, const char *function,
 	if (unlikely(ext4_forced_shutdown(EXT4_SB(sb))))
 		return;
 
-	/* Special case: if the error is EROFS, and we're not already
+	/*
+	 * Special case: if the error is EROFS, and we're not already
 	 * inside a transaction, then there's really no point in logging
-	 * an error. */
+	 * an error.
+	 */
 	if (errno == -EROFS && journal_current_handle() == NULL && sb_rdonly(sb))
 		return;
 
@@ -1219,10 +1225,12 @@ static void ext4_put_super(struct super_block *sb)
 		kfree(get_qf_name(sb, sbi, i));
 #endif
 
-	/* Debugging code just in case the in-memory inode orphan list
+	/*
+	 * Debugging code just in case the in-memory inode orphan list
 	 * isn't empty.  The on-disk one can be non-empty if we've
 	 * detected an error and taken the fs readonly, but the
-	 * in-memory list had better be clean by this point. */
+	 * in-memory list had better be clean by this point.
+	 */
 	if (!list_empty(&sbi->s_orphan))
 		dump_orphan_list(sb, sbi);
 	ASSERT(list_empty(&sbi->s_orphan));
@@ -4311,7 +4319,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 				 encoding_flags);
 			goto failed_mount;
 		}
-		ext4_msg(sb, KERN_INFO,"Using encoding defined by superblock: "
+		ext4_msg(sb, KERN_INFO, "Using encoding defined by superblock: "
 			 "%s-%s with flags 0x%hx", encoding_info->name,
 			 encoding_info->version?:"\b", encoding_flags);
 
@@ -4839,11 +4847,14 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 		goto failed_mount_wq;
 	}
 
-	/* We have now updated the journal if required, so we can
-	 * validate the data journaling mode. */
+	/*
+	 * We have now updated the journal if required, so we can
+	 * validate the data journaling mode.
+	 */
 	switch (test_opt(sb, DATA_FLAGS)) {
 	case 0:
-		/* No mode set, assume a default based on the journal
+		/*
+		 * No mode set, assume a default based on the journal
 		 * capabilities: ORDERED_DATA if the journal can
 		 * cope, else JOURNAL_DATA
 		 */
@@ -6485,8 +6496,10 @@ static int ext4_quota_off(struct super_block *sb, int type)
 	handle_t *handle;
 	int err;
 
-	/* Force all delayed allocation blocks to be allocated.
-	 * Caller already holds s_umount sem */
+	/*
+	 * Force all delayed allocation blocks to be allocated.
+	 * Caller already holds s_umount sem
+	 */
 	if (test_opt(sb, DELALLOC))
 		sync_filesystem(sb);
 
@@ -6523,10 +6536,12 @@ static int ext4_quota_off(struct super_block *sb, int type)
 	return dquot_quota_off(sb, type);
 }
 
-/* Read data from quotafile - avoid pagecache and such because we cannot afford
+/*
+ * Read data from quotafile - avoid pagecache and such because we cannot afford
  * acquiring the locks... As quota files are never truncated and quota code
  * itself serializes the operations (and no one else should touch the files)
- * we don't have to be afraid of races */
+ * we don't have to be afraid of races
+ */
 static ssize_t ext4_quota_read(struct super_block *sb, int type, char *data,
 			       size_t len, loff_t off)
 {
@@ -6562,8 +6577,10 @@ static ssize_t ext4_quota_read(struct super_block *sb, int type, char *data,
 	return len;
 }
 
-/* Write to quotafile (we know the transaction is already started and has
- * enough credits) */
+/*
+ * Write to quotafile, we know, that the transaction was already started
+ * and has enough credits.
+ */
 static ssize_t ext4_quota_write(struct super_block *sb, int type,
 				const char *data, size_t len, loff_t off)
 {
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ