Skip to content

Commit 6f59856

Browse files
terraluna9771Naim
authored andcommitted
ntfs: add missing newlines to pr_err() messages
There is an inconsistent use of pr_err() statements in the current code. Many error messages are missing the \n termination, what results in the messages being printed with a delay, only after a next printk() line is printed. It prevents relying on printk() to monitor the driver errors. This patch is modifying only text messages, no functional change. Signed-off-by: Woody Suwalski <terraluna977@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
1 parent d9d8d4f commit 6f59856

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

fs/ntfs/attrib.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2062,7 +2062,7 @@ static int ntfs_make_room_for_attr(struct mft_record *m, u8 *pos, u32 size)
20622062

20632063
/* Rigorous consistency checks. */
20642064
if (!m || !pos || pos < (u8 *)m) {
2065-
pr_err("%s: pos=%p m=%p", __func__, pos, m);
2065+
pr_err("%s: pos=%p m=%p\n", __func__, pos, m);
20662066
return -EINVAL;
20672067
}
20682068

@@ -2240,16 +2240,16 @@ static int ntfs_non_resident_attr_record_add(struct ntfs_inode *ni, __le32 type,
22402240
err = ntfs_attr_can_be_non_resident(ni->vol, type);
22412241
if (err) {
22422242
if (err == -EPERM)
2243-
pr_err("Attribute can't be non resident");
2243+
pr_err("Attribute can't be non resident\n");
22442244
else
2245-
pr_err("ntfs_attr_can_be_non_resident failed");
2245+
pr_err("ntfs_attr_can_be_non_resident failed\n");
22462246
return err;
22472247
}
22482248

22492249
/* Locate place where record should be. */
22502250
ctx = ntfs_attr_get_search_ctx(ni, NULL);
22512251
if (!ctx) {
2252-
pr_err("%s: Failed to get search context", __func__);
2252+
pr_err("%s: Failed to get search context\n", __func__);
22532253
return -ENOMEM;
22542254
}
22552255
/*
@@ -2260,11 +2260,11 @@ static int ntfs_non_resident_attr_record_add(struct ntfs_inode *ni, __le32 type,
22602260
err = ntfs_attr_find(type, name, name_len, CASE_SENSITIVE, NULL, 0, ctx);
22612261
if (!err) {
22622262
err = -EEXIST;
2263-
pr_err("Attribute 0x%x already present", type);
2263+
pr_err("Attribute 0x%x already present\n", type);
22642264
goto put_err_out;
22652265
}
22662266
if (err != -ENOENT) {
2267-
pr_err("ntfs_attr_find failed");
2267+
pr_err("ntfs_attr_find failed\n");
22682268
err = -EIO;
22692269
goto put_err_out;
22702270
}
@@ -2279,7 +2279,7 @@ static int ntfs_non_resident_attr_record_add(struct ntfs_inode *ni, __le32 type,
22792279
sizeof(a->data.non_resident.compressed_size) : 0);
22802280
err = ntfs_make_room_for_attr(ctx->mrec, (u8 *) ctx->attr, length);
22812281
if (err) {
2282-
pr_err("Failed to make room for attribute");
2282+
pr_err("Failed to make room for attribute\n");
22832283
goto put_err_out;
22842284
}
22852285

@@ -2319,7 +2319,7 @@ static int ntfs_non_resident_attr_record_add(struct ntfs_inode *ni, __le32 type,
23192319
if (type != AT_ATTRIBUTE_LIST && NInoAttrList(base_ni)) {
23202320
err = ntfs_attrlist_entry_add(ni, a);
23212321
if (err) {
2322-
pr_err("Failed add attr entry to attrlist");
2322+
pr_err("Failed add attr entry to attrlist\n");
23232323
ntfs_attr_record_resize(m, a, 0);
23242324
goto put_err_out;
23252325
}
@@ -2334,7 +2334,7 @@ static int ntfs_non_resident_attr_record_add(struct ntfs_inode *ni, __le32 type,
23342334
err = ntfs_attr_lookup(type, name, name_len, CASE_SENSITIVE,
23352335
lowest_vcn, NULL, 0, ctx);
23362336
if (err) {
2337-
pr_err("%s: attribute lookup failed", __func__);
2337+
pr_err("%s: attribute lookup failed\n", __func__);
23382338
ntfs_attr_put_search_ctx(ctx);
23392339
return err;
23402340

@@ -2825,7 +2825,7 @@ int ntfs_attr_open(struct ntfs_inode *ni, const __le32 type,
28252825
ctx = ntfs_attr_get_search_ctx(base_ni, NULL);
28262826
if (!ctx) {
28272827
err = -ENOMEM;
2828-
pr_err("%s: Failed to get search context", __func__);
2828+
pr_err("%s: Failed to get search context\n", __func__);
28292829
goto err_out;
28302830
}
28312831

@@ -4615,7 +4615,7 @@ int ntfs_attr_expand(struct ntfs_inode *ni, const s64 newsize, const s64 preallo
46154615
* which is what Windows NT4 does, too.
46164616
*/
46174617
if (NInoEncrypted(ni)) {
4618-
pr_err("Failed to truncate encrypted attribute");
4618+
pr_err("Failed to truncate encrypted attribute\n");
46194619
return -EACCES;
46204620
}
46214621

@@ -4669,12 +4669,12 @@ int ntfs_attr_truncate_i(struct ntfs_inode *ni, const s64 newsize, unsigned int
46694669
* which is what Windows NT4 does, too.
46704670
*/
46714671
if (NInoEncrypted(ni)) {
4672-
pr_err("Failed to truncate encrypted attribute");
4672+
pr_err("Failed to truncate encrypted attribute\n");
46734673
return -EACCES;
46744674
}
46754675

46764676
if (NInoCompressed(ni)) {
4677-
pr_err("Failed to truncate compressed attribute");
4677+
pr_err("Failed to truncate compressed attribute\n");
46784678
return -EOPNOTSUPP;
46794679
}
46804680

fs/ntfs/ea.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ static int ntfs_new_attr_flags(struct ntfs_inode *ni, __le32 fattr)
613613
goto out;
614614

615615
if (a->data.non_resident.data_size) {
616-
pr_err("Can't change sparsed/compressed for non-empty file");
616+
pr_err("Can't change sparsed/compressed for non-empty file\n");
617617
err = -EOPNOTSUPP;
618618
goto err_out;
619619
}

fs/ntfs/runlist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ int ntfs_rl_sparse(struct runlist_element *rl)
15981598
for (rlc = rl; rlc->length; rlc++)
15991599
if (rlc->lcn < 0) {
16001600
if (rlc->lcn != LCN_HOLE && rlc->lcn != LCN_DELALLOC) {
1601-
pr_err("%s: bad runlist", __func__);
1601+
pr_err("%s: bad runlist\n", __func__);
16021602
return -EINVAL;
16031603
}
16041604
return 1;

0 commit comments

Comments
 (0)