[PATCH] reiserfs: Fix warning for non-existing journal devices

From: Andrew Morton
Date: Mon Apr 09 2018 - 10:17:44 EST


When a journal device specified as part of mount options does not exist,
reiserfs issues a warking like:

reiserfs_warning(super,
"journal_init_dev: Cannot open '%s': %i",
jdev_name, result);

Now this misses a parameter 'id' of reiserfs_warning() which comes
second. As such, the format string is interpreted as an ID and jdev_name as
a format string resulting in funny issues.

Fix the problem by adding missing 'id' argument.

Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Acked-by: Jeff Mahoney <jeffm@xxxxxxxx>
Signed-off-by: Jan Kara <jack@xxxxxxx>
---
fs/reiserfs/journal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 70057359fbaf..23148c3ed675 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -2643,7 +2643,7 @@ static int journal_init_dev(struct super_block *super,
if (IS_ERR(journal->j_dev_bd)) {
result = PTR_ERR(journal->j_dev_bd);
journal->j_dev_bd = NULL;
- reiserfs_warning(super,
+ reiserfs_warning(super, "sh-457",
"journal_init_dev: Cannot open '%s': %i",
jdev_name, result);
return result;
--
2.13.6


--3boyrbnt6apoxgr5--