Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=266f5aa0970409bf1ebdf9fc4e65a1186eeed3c2 Commit: 266f5aa0970409bf1ebdf9fc4e65a1186eeed3c2 Parent: 4f84e4be53a04a65d97bf0faa0c8f99e29bc0170 Author: Carsten Otte <[EMAIL PROTECTED]> AuthorDate: Sat Jun 23 17:16:46 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Sun Jun 24 08:59:12 2007 -0700
ext2: disallow setting xip on remount Yan Zheng pointed out that ext2_remount lacks checking if -o xip should be enabled or not. This patch checks for presence of direct_access on the backing block device and if the blocksize meets the requirements. Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> Cc: Yan Zheng <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/ext2/super.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 16337bf..c9fd8cf 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -1038,6 +1038,14 @@ 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)) { + printk("XIP: Unsupported blocksize\n"); + goto restore_opts; + } + es = sbi->s_es; if (((sbi->s_mount_opt & EXT2_MOUNT_XIP) != (old_mount_opt & EXT2_MOUNT_XIP)) && - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html