Thread (49 messages) 49 messages, 6 authors, 2022-09-25
STALE1371d
Revisions (2)
  1. rfc current
  2. v2 [diff vs current]

[RFC PATCH 09/20] befs: Fix error processing when load_nls() fails

From: Pali Rohár <pali@kernel.org>
Date: 2021-08-08 16:25:55
Also in: linux-cifs, lkml
Subsystem: befs file system, filesystems (vfs and infrastructure), the rest · Maintainers: Luis de Bethencourt, Salah Triki, Alexander Viro, Christian Brauner, Linus Torvalds

Ensure that specified charset in iocharset= mount option is used. On error
correctly propagate error code back to the caller.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 fs/befs/linuxvfs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index e071157bdaa3..963da3e9ab5d 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -914,10 +914,9 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
 			   befs_sb->mount_opts.iocharset);
 		befs_sb->nls = load_nls(befs_sb->mount_opts.iocharset);
 		if (!befs_sb->nls) {
-			befs_warning(sb, "Cannot load nls %s"
-					" loading default nls",
+			befs_error(sb, "Cannot load nls %s",
 					befs_sb->mount_opts.iocharset);
-			befs_sb->nls = load_nls_default();
+			goto unacquire_priv_sbp;
 		}
 	/* load default nls if none is specified  in mount options */
 	} else {
-- 
2.20.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help