isofs: Fix lseek() to position beyond 4 GB
[platform/adaptation/renesas_rcar/renesas_kernel.git] / fs / isofs / inode.c
index 85f96bc..5a44811 100644 (file)
@@ -46,10 +46,7 @@ static void isofs_put_super(struct super_block *sb)
 #ifdef CONFIG_JOLIET
        lock_kernel();
 
-       if (sbi->s_nls_iocharset) {
-               unload_nls(sbi->s_nls_iocharset);
-               sbi->s_nls_iocharset = NULL;
-       }
+       unload_nls(sbi->s_nls_iocharset);
 
        unlock_kernel();
 #endif
@@ -725,7 +722,12 @@ root_found:
        }
 
        s->s_magic = ISOFS_SUPER_MAGIC;
-       s->s_maxbytes = 0xffffffff; /* We can handle files up to 4 GB */
+
+       /*
+        * With multi-extent files, file size is only limited by the maximum
+        * size of a file system, which is 8 TB.
+        */
+       s->s_maxbytes = 0x80000000000LL;
 
        /*
         * The CDROM is read-only, has no nodes (devices) on it, and since
@@ -912,8 +914,7 @@ out_no_root:
                printk(KERN_WARNING "%s: get root inode failed\n", __func__);
 out_no_inode:
 #ifdef CONFIG_JOLIET
-       if (sbi->s_nls_iocharset)
-               unload_nls(sbi->s_nls_iocharset);
+       unload_nls(sbi->s_nls_iocharset);
 #endif
        goto out_freesbi;
 out_no_read: