From: Jan Gruber <j4n6ru@gmail.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca
Cc: trivial@kernel.org, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org, Jan Gruber <j4n6ru@gmail.com>
Subject: [PATCH] ext4: Fix comments and spaces to follow coding style
Date: Tue, 6 Jul 2021 20:39:00 +0200 [thread overview]
Message-ID: <20210706183900.310975-1-j4n6ru@gmail.com> (raw)
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@gmail.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
next reply other threads:[~2021-07-06 18:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-06 18:39 Jan Gruber [this message]
2021-07-06 19:20 ` Theodore Ts'o
2021-07-07 5:25 ` Jan Gru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210706183900.310975-1-j4n6ru@gmail.com \
--to=j4n6ru@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®