aboutsummaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2015-06-25 15:02:41 -0700
committerMister Oyster <oysterized@gmail.com>2017-12-31 01:44:57 +0100
commit63e3f7d17022e42cc757763f72365e03c07729d0 (patch)
tree38eeccffafe7222b6a37c11623e660f741c3e46a /fs/ext4
parentf035f6759a0fda562c0d36313f6a4ed5e5ad1879 (diff)
downloadandroid_kernel_m2note-63e3f7d17022e42cc757763f72365e03c07729d0.tar.gz
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> Signed-off-by: Joe Maples <joe@frap129.org>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 524fab3ca..fd7bc431b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3134,7 +3134,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
unsigned long journal_devnum = 0;
unsigned long def_mount_opts;
struct inode *root;
- char *cp;
const char *descr;
int ret = -ENOMEM;
int blocksize, clustersize;
@@ -3163,8 +3162,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
part_stat_read(sb->s_bdev->bd_part, sectors[1]);
/* Cleanup superblock name */
- for (cp = sb->s_id; (cp = strchr(cp, '/'));)
- *cp = '!';
+ strreplace(sb->s_id, '/', '!');
/* -EINVAL is default */
ret = -EINVAL;