]> git.pld-linux.org Git - packages/kernel.git/blob - linux-2.6-vs2.3-quota.patch
- updated to 2.6.29.2 (builds and works --without apparmor --without grsecurity)
[packages/kernel.git] / linux-2.6-vs2.3-quota.patch
1 --- linux-2.6.19/fs/quota.c~    2007-03-01 19:45:40.694648408 +0100
2 +++ linux-2.6.19/fs/quota.c     2007-03-02 00:27:24.196276620 +0100
3 @@ -415,34 +415,6 @@
4         return 0;
5  }
6  
7 -/*
8 - * look up a superblock on which quota ops will be performed
9 - * - use the name of a block device to find the superblock thereon
10 - */
11 -static inline struct super_block *quotactl_block(const char __user *special)
12 -{
13 -#ifdef CONFIG_BLOCK
14 -       struct block_device *bdev;
15 -       struct super_block *sb;
16 -       char *tmp = getname(special);
17 -
18 -       if (IS_ERR(tmp))
19 -               return ERR_PTR(PTR_ERR(tmp));
20 -       bdev = lookup_bdev(tmp);
21 -       putname(tmp);
22 -       if (IS_ERR(bdev))
23 -               return ERR_PTR(PTR_ERR(bdev));
24 -       sb = get_super(bdev);
25 -       bdput(bdev);
26 -       if (!sb)
27 -               return ERR_PTR(-ENODEV);
28 -
29 -       return sb;
30 -#else
31 -       return ERR_PTR(-ENODEV);
32 -#endif
33 -}
34 -
35  #if defined(CONFIG_BLK_DEV_VROOT) || defined(CONFIG_BLK_DEV_VROOT_MODULE)
36  
37  #include <linux/vroot.h>
38 @@ -481,6 +453,50 @@
39  #endif
40  
41  /*
42 + * look up a superblock on which quota ops will be performed
43 + * - use the name of a block device to find the superblock thereon
44 + */
45 +static inline struct super_block *quotactl_block(const char __user *special)
46 +{
47 +#ifdef CONFIG_BLOCK
48 +       struct block_device *bdev;
49 +       struct super_block *sb;
50 +       char *tmp = getname(special);
51 +
52 +       if (IS_ERR(tmp))
53 +               return ERR_PTR(PTR_ERR(tmp));
54 +       bdev = lookup_bdev(tmp);
55 +       putname(tmp);
56 +       if (IS_ERR(bdev))
57 +               return ERR_PTR(PTR_ERR(bdev));
58 +#if defined(CONFIG_BLK_DEV_VROOT) || defined(CONFIG_BLK_DEV_VROOT_MODULE)
59 +       if (bdev && bdev->bd_inode &&
60 +                       imajor(bdev->bd_inode) == VROOT_MAJOR) {
61 +               struct block_device *bdnew = (void *)-EINVAL;
62 +
63 +               if (vroot_get_real_bdev)
64 +                       bdnew = vroot_get_real_bdev(bdev);
65 +               else
66 +                       vxdprintk(VXD_CBIT(misc, 0),
67 +                                       "vroot_get_real_bdev not set");
68 +               bdput(bdev);
69 +               if (IS_ERR(bdnew))
70 +                       return ERR_PTR(PTR_ERR(bdnew));
71 +               bdev = bdnew;
72 +       }
73 +#endif
74 +       sb = get_super(bdev);
75 +       bdput(bdev);
76 +       if (!sb)
77 +               return ERR_PTR(-ENODEV);
78 +
79 +       return sb;
80 +#else
81 +       return ERR_PTR(-ENODEV);
82 +#endif
83 +}
84 +
85 +/*
86   * This is the system call interface. This communicates with
87   * the user-level programs. Currently this only supports diskquota
88   * calls. Maybe we need to add the process quotas etc. in the future,
This page took 0.047144 seconds and 3 git commands to generate.