]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Remove iso9660 check for sbsector < 660Mb
authorAndrew Morton <akpm@osdl.org>
Tue, 30 Dec 2003 07:48:11 +0000 (23:48 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 30 Dec 2003 07:48:11 +0000 (23:48 -0800)
From: Jon Burgess <mplayer@jburgess.uklinux.net>

The iso9660 filesystem code checks that the "sbsector" option is
positioned within the first 660Mb of the disk.

Today the iso9660 filesystem is used on DVD's which are much bigger than
660Mb and this check prevents the sbsector option being used to specify
the location of the superblock of multisession DVD's.

With this check removed I can mount the second session on a DVD-R by
specifying the sbsector, even though the  firmware on that drive returns
bogus data for the TOC.

If an invalid large sector number is entered then a "request beyond end
of device" error is reported elsewhere in the block code, but appears to
do no damage.

fs/isofs/inode.c

index bee7de9b4603f9c8e80d2244e629b393184ef7e1..0c21ca81fc7e63ff5e8f23e9cb05c5718ecee0ef 100644 (file)
@@ -447,10 +447,7 @@ static int parse_options(char *options, struct iso9660_options * popt)
                case Opt_sb:
                        if (match_int(&args[0], &option))
                                return 0;
-                       n = option;
-                       if (n > 660 * 512)
-                               return 0;
-                       popt->sbsector = n;
+                       popt->sbsector = option;
                        break;
                case Opt_check_r:
                        popt->check = 'r';