On Sun 23-03-14 15:08:38, Matthew Wilcox wrote: > Jan Kara pointed out that calling ext2_xip_verify_sb() in ext2_remount() > doesn't make sense, since changing the XIP option on remount isn't > allowed. It also doesn't make sense to re-check whether blocksize is > supported since it can't change between mounts. > > Replace the call to ext2_xip_verify_sb() in ext2_fill_super() with the > equivalent check and delete the definition. Looks good. You can add: Reviewed-by: Jan Kara <jack@xxxxxxx> One nit below: ... > @@ -1273,22 +1275,11 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data) > sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | > ((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0); > > - ext2_xip_verify_sb(sb); /* see if bdev supports xip, unset > - EXT2_MOUNT_XIP if not */ > - > - if ((ext2_use_xip(sb)) && (sb->s_blocksize != PAGE_SIZE)) { > - ext2_msg(sb, KERN_WARNING, > - "warning: unsupported blocksize for xip"); > - err = -EINVAL; > - goto restore_opts; > - } > - > es = sbi->s_es; > - if ((sbi->s_mount_opt ^ old_mount_opt) & EXT2_MOUNT_XIP) { > + if ((sbi->s_mount_opt ^ old_opts.s_mount_opt) & EXT2_MOUNT_XIP) { > ext2_msg(sb, KERN_WARNING, "warning: refusing change of " > "xip flag with busy inodes while remounting"); > - sbi->s_mount_opt &= ~EXT2_MOUNT_XIP; > - sbi->s_mount_opt |= old_mount_opt & EXT2_MOUNT_XIP; > + sbi->s_mount_opt ^= EXT2_MOUNT_XIP; Although this is correct, it was easier to see that the previous code is correct so I'd prefer if you kept it that way. Honza -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html