diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-06-25 18:02:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-25 20:00:41 -0400 |
commit | ec3904dc6537fe606b281b368639236296ee7257 (patch) | |
tree | 2311703e8df00f9833ca14d675e7f287b11acc1a /fs/ext4/super.c | |
parent | 81ae394bdc473cafa5074948516fc83b504ea60b (diff) |
fs/ext4/super.c: use strreplace() in ext4_fill_super()
This makes a very large function a little smaller.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ca9d4a2fed41..5f3c43a66937 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -3420,7 +3420,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
3420 | unsigned long journal_devnum = 0; | 3420 | unsigned long journal_devnum = 0; |
3421 | unsigned long def_mount_opts; | 3421 | unsigned long def_mount_opts; |
3422 | struct inode *root; | 3422 | struct inode *root; |
3423 | char *cp; | ||
3424 | const char *descr; | 3423 | const char *descr; |
3425 | int ret = -ENOMEM; | 3424 | int ret = -ENOMEM; |
3426 | int blocksize, clustersize; | 3425 | int blocksize, clustersize; |
@@ -3456,8 +3455,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
3456 | #endif | 3455 | #endif |
3457 | 3456 | ||
3458 | /* Cleanup superblock name */ | 3457 | /* Cleanup superblock name */ |
3459 | for (cp = sb->s_id; (cp = strchr(cp, '/'));) | 3458 | strreplace(sb->s_id, '/', '!'); |
3460 | *cp = '!'; | ||
3461 | 3459 | ||
3462 | /* -EINVAL is default */ | 3460 | /* -EINVAL is default */ |
3463 | ret = -EINVAL; | 3461 | ret = -EINVAL; |