SOURCES: linux-2.6-vs2.3-quota.patch (NEW) - fix quota on vroot de...
baggins
baggins at pld-linux.org
Fri Mar 2 13:31:58 CET 2007
Author: baggins Date: Fri Mar 2 12:31:58 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fix quota on vroot devices for vservers
---- Files affected:
SOURCES:
linux-2.6-vs2.3-quota.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/linux-2.6-vs2.3-quota.patch
diff -u /dev/null SOURCES/linux-2.6-vs2.3-quota.patch:1.1
--- /dev/null Fri Mar 2 13:31:58 2007
+++ SOURCES/linux-2.6-vs2.3-quota.patch Fri Mar 2 13:31:53 2007
@@ -0,0 +1,88 @@
+--- linux-2.6.19/fs/quota.c~ 2007-03-01 19:45:40.694648408 +0100
++++ linux-2.6.19/fs/quota.c 2007-03-02 00:27:24.196276620 +0100
+@@ -415,34 +415,6 @@
+ return 0;
+ }
+
+-/*
+- * look up a superblock on which quota ops will be performed
+- * - use the name of a block device to find the superblock thereon
+- */
+-static inline struct super_block *quotactl_block(const char __user *special)
+-{
+-#ifdef CONFIG_BLOCK
+- struct block_device *bdev;
+- struct super_block *sb;
+- char *tmp = getname(special);
+-
+- if (IS_ERR(tmp))
+- return ERR_PTR(PTR_ERR(tmp));
+- bdev = lookup_bdev(tmp);
+- putname(tmp);
+- if (IS_ERR(bdev))
+- return ERR_PTR(PTR_ERR(bdev));
+- sb = get_super(bdev);
+- bdput(bdev);
+- if (!sb)
+- return ERR_PTR(-ENODEV);
+-
+- return sb;
+-#else
+- return ERR_PTR(-ENODEV);
+-#endif
+-}
+-
+ #if defined(CONFIG_BLK_DEV_VROOT) || defined(CONFIG_BLK_DEV_VROOT_MODULE)
+
+ #include <linux/vroot.h>
+@@ -481,6 +453,50 @@
+ #endif
+
+ /*
++ * look up a superblock on which quota ops will be performed
++ * - use the name of a block device to find the superblock thereon
++ */
++static inline struct super_block *quotactl_block(const char __user *special)
++{
++#ifdef CONFIG_BLOCK
++ struct block_device *bdev;
++ struct super_block *sb;
++ char *tmp = getname(special);
++
++ if (IS_ERR(tmp))
++ return ERR_PTR(PTR_ERR(tmp));
++ bdev = lookup_bdev(tmp);
++ putname(tmp);
++ if (IS_ERR(bdev))
++ return ERR_PTR(PTR_ERR(bdev));
++#if defined(CONFIG_BLK_DEV_VROOT) || defined(CONFIG_BLK_DEV_VROOT_MODULE)
++ if (bdev && bdev->bd_inode &&
++ imajor(bdev->bd_inode) == VROOT_MAJOR) {
++ struct block_device *bdnew = (void *)-EINVAL;
++
++ if (vroot_get_real_bdev)
++ bdnew = vroot_get_real_bdev(bdev);
++ else
++ vxdprintk(VXD_CBIT(misc, 0),
++ "vroot_get_real_bdev not set");
++ bdput(bdev);
++ if (IS_ERR(bdnew))
++ return ERR_PTR(PTR_ERR(bdnew));
++ bdev = bdnew;
++ }
++#endif
++ sb = get_super(bdev);
++ bdput(bdev);
++ if (!sb)
++ return ERR_PTR(-ENODEV);
++
++ return sb;
++#else
++ return ERR_PTR(-ENODEV);
++#endif
++}
++
++/*
+ * This is the system call interface. This communicates with
+ * the user-level programs. Currently this only supports diskquota
+ * calls. Maybe we need to add the process quotas etc. in the future,
================================================================
More information about the pld-cvs-commit
mailing list