Skip to content

Commit

Permalink
fs/ext4/super.c: use strreplace() in ext4_fill_super()
Browse files Browse the repository at this point in the history
This makes a very large function a little smaller.

Signed-off-by: Rasmus Villemoes <[email protected]>
Cc: "Theodore Ts'o" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Villemoes authored and torvalds committed Jun 26, 2015
1 parent 81ae394 commit ec3904d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ec3904d

Please sign in to comment.