shmem.c (271ecc5253e2b317d729d366560789cd7f93836c) | shmem.c (1170532bb49f9468aedabdc1d5a560e2521a2bcc) |
---|---|
1/* 2 * Resizable virtual memory filesystem for Linux. 3 * 4 * Copyright (C) 2000 Linus Torvalds. 5 * 2000 Transmeta Corp. 6 * 2000-2001 Christoph Rohland 7 * 2000-2001 SAP AG 8 * 2002 Red Hat Inc. --- 2809 unchanged lines hidden (view full) --- 2818 break; 2819 } 2820 } 2821 if (!*this_char) 2822 continue; 2823 if ((value = strchr(this_char,'=')) != NULL) { 2824 *value++ = 0; 2825 } else { | 1/* 2 * Resizable virtual memory filesystem for Linux. 3 * 4 * Copyright (C) 2000 Linus Torvalds. 5 * 2000 Transmeta Corp. 6 * 2000-2001 Christoph Rohland 7 * 2000-2001 SAP AG 8 * 2002 Red Hat Inc. --- 2809 unchanged lines hidden (view full) --- 2818 break; 2819 } 2820 } 2821 if (!*this_char) 2822 continue; 2823 if ((value = strchr(this_char,'=')) != NULL) { 2824 *value++ = 0; 2825 } else { |
2826 printk(KERN_ERR 2827 "tmpfs: No value for mount option '%s'\n", 2828 this_char); | 2826 pr_err("tmpfs: No value for mount option '%s'\n", 2827 this_char); |
2829 goto error; 2830 } 2831 2832 if (!strcmp(this_char,"size")) { 2833 unsigned long long size; 2834 size = memparse(value,&rest); 2835 if (*rest == '%') { 2836 size <<= PAGE_SHIFT; --- 38 unchanged lines hidden (view full) --- 2875 if (!gid_valid(sbinfo->gid)) 2876 goto bad_val; 2877 } else if (!strcmp(this_char,"mpol")) { 2878 mpol_put(mpol); 2879 mpol = NULL; 2880 if (mpol_parse_str(value, &mpol)) 2881 goto bad_val; 2882 } else { | 2828 goto error; 2829 } 2830 2831 if (!strcmp(this_char,"size")) { 2832 unsigned long long size; 2833 size = memparse(value,&rest); 2834 if (*rest == '%') { 2835 size <<= PAGE_SHIFT; --- 38 unchanged lines hidden (view full) --- 2874 if (!gid_valid(sbinfo->gid)) 2875 goto bad_val; 2876 } else if (!strcmp(this_char,"mpol")) { 2877 mpol_put(mpol); 2878 mpol = NULL; 2879 if (mpol_parse_str(value, &mpol)) 2880 goto bad_val; 2881 } else { |
2883 printk(KERN_ERR "tmpfs: Bad mount option %s\n", 2884 this_char); | 2882 pr_err("tmpfs: Bad mount option %s\n", this_char); |
2885 goto error; 2886 } 2887 } 2888 sbinfo->mpol = mpol; 2889 return 0; 2890 2891bad_val: | 2883 goto error; 2884 } 2885 } 2886 sbinfo->mpol = mpol; 2887 return 0; 2888 2889bad_val: |
2892 printk(KERN_ERR "tmpfs: Bad value '%s' for mount option '%s'\n", | 2890 pr_err("tmpfs: Bad value '%s' for mount option '%s'\n", |
2893 value, this_char); 2894error: 2895 mpol_put(mpol); 2896 return 1; 2897 2898} 2899 2900static int shmem_remount_fs(struct super_block *sb, int *flags, char *data) --- 380 unchanged lines hidden (view full) --- 3281 return 0; 3282 3283 error = shmem_init_inodecache(); 3284 if (error) 3285 goto out3; 3286 3287 error = register_filesystem(&shmem_fs_type); 3288 if (error) { | 2891 value, this_char); 2892error: 2893 mpol_put(mpol); 2894 return 1; 2895 2896} 2897 2898static int shmem_remount_fs(struct super_block *sb, int *flags, char *data) --- 380 unchanged lines hidden (view full) --- 3279 return 0; 3280 3281 error = shmem_init_inodecache(); 3282 if (error) 3283 goto out3; 3284 3285 error = register_filesystem(&shmem_fs_type); 3286 if (error) { |
3289 printk(KERN_ERR "Could not register tmpfs\n"); | 3287 pr_err("Could not register tmpfs\n"); |
3290 goto out2; 3291 } 3292 3293 shm_mnt = kern_mount(&shmem_fs_type); 3294 if (IS_ERR(shm_mnt)) { 3295 error = PTR_ERR(shm_mnt); | 3288 goto out2; 3289 } 3290 3291 shm_mnt = kern_mount(&shmem_fs_type); 3292 if (IS_ERR(shm_mnt)) { 3293 error = PTR_ERR(shm_mnt); |
3296 printk(KERN_ERR "Could not kern_mount tmpfs\n"); | 3294 pr_err("Could not kern_mount tmpfs\n"); |
3297 goto out1; 3298 } 3299 return 0; 3300 3301out1: 3302 unregister_filesystem(&shmem_fs_type); 3303out2: 3304 shmem_destroy_inodecache(); --- 214 unchanged lines hidden --- | 3295 goto out1; 3296 } 3297 return 0; 3298 3299out1: 3300 unregister_filesystem(&shmem_fs_type); 3301out2: 3302 shmem_destroy_inodecache(); --- 214 unchanged lines hidden --- |