From: Rasmus Villemoes Date: Thu, 25 Jun 2015 22:02:41 +0000 (-0700) Subject: fs/ext4/super.c: use strreplace() in ext4_fill_super() X-Git-Tag: firefly_0821_release~176^2~1559^2~28 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ec3904dc6537fe606b281b368639236296ee7257;p=firefly-linux-kernel-4.4.55.git fs/ext4/super.c: use strreplace() in ext4_fill_super() This makes a very large function a little smaller. Signed-off-by: Rasmus Villemoes Cc: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) unsigned long journal_devnum = 0; unsigned long def_mount_opts; struct inode *root; - char *cp; const char *descr; int ret = -ENOMEM; int blocksize, clustersize; @@ -3456,8 +3455,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) #endif /* Cleanup superblock name */ - for (cp = sb->s_id; (cp = strchr(cp, '/'));) - *cp = '!'; + strreplace(sb->s_id, '/', '!'); /* -EINVAL is default */ ret = -EINVAL;