lkml.org 
[lkml]   [2014]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 12/22] ext2: Remove ext2_xip_verify_sb()
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@suse.cz>

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@suse.cz>
SUSE Labs, CR


\
 
 \ /
  Last update: 2014-04-09 12:21    [W:0.436 / U:3.900 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site