diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2006-04-21 06:49:06 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2006-04-21 06:49:06 +0000 |
commit | 4f7f55ced0340879922430aff63c1652da991b72 (patch) | |
tree | 4ba2c99412a6ee70dbb66aee61beb75082c42a95 /vserver-sources | |
parent | Adding 026.009 to the tree (diff) | |
download | misc-4f7f55ced0340879922430aff63c1652da991b72.tar.gz misc-4f7f55ced0340879922430aff63c1652da991b72.tar.bz2 misc-4f7f55ced0340879922430aff63c1652da991b72.zip |
fix bme patch
svn path=/; revision=338
Diffstat (limited to 'vserver-sources')
-rw-r--r-- | vserver-sources/2.0.1-r3/4914_vs2.0.1-bme-0.06.2.patch (renamed from vserver-sources/2.0.1-r3/4914_vs2.0.1-bme-0.06.1.patch) | 305 |
1 files changed, 151 insertions, 154 deletions
diff --git a/vserver-sources/2.0.1-r3/4914_vs2.0.1-bme-0.06.1.patch b/vserver-sources/2.0.1-r3/4914_vs2.0.1-bme-0.06.2.patch index df754d1..3a759f2 100644 --- a/vserver-sources/2.0.1-r3/4914_vs2.0.1-bme-0.06.1.patch +++ b/vserver-sources/2.0.1-r3/4914_vs2.0.1-bme-0.06.2.patch @@ -1,7 +1,7 @@ -Index: vserver-sources-2.6.15_2.0.1/arch/sparc64/solaris/fs.c +Index: linux-2.6.15/arch/sparc64/solaris/fs.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/arch/sparc64/solaris/fs.c -+++ vserver-sources-2.6.15_2.0.1/arch/sparc64/solaris/fs.c +--- linux-2.6.15.orig/arch/sparc64/solaris/fs.c ++++ linux-2.6.15/arch/sparc64/solaris/fs.c @@ -362,7 +362,7 @@ static int report_statvfs(struct vfsmoun int j = strlen (p); @@ -20,11 +20,19 @@ Index: vserver-sources-2.6.15_2.0.1/arch/sparc64/solaris/fs.c if (mnt->mnt_flags & MNT_NOSUID) i |= 2; if (!sysv_valid_dev(inode->i_sb->s_dev)) return -EOVERFLOW; -Index: vserver-sources-2.6.15_2.0.1/fs/ext2/ioctl.c +Index: linux-2.6.15/fs/ext2/ioctl.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/ext2/ioctl.c -+++ vserver-sources-2.6.15_2.0.1/fs/ext2/ioctl.c -@@ -29,7 +29,8 @@ int ext2_ioctl (struct inode * inode, st +--- linux-2.6.15.orig/fs/ext2/ioctl.c ++++ linux-2.6.15/fs/ext2/ioctl.c +@@ -10,6 +10,7 @@ + #include "ext2.h" + #include <linux/time.h> + #include <linux/sched.h> ++#include <linux/mount.h> + #include <asm/current.h> + #include <asm/uaccess.h> + +@@ -29,7 +30,8 @@ int ext2_ioctl (struct inode * inode, st case EXT2_IOC_SETFLAGS: { unsigned int oldflags; @@ -34,7 +42,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/ext2/ioctl.c return -EROFS; if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) -@@ -70,7 +71,8 @@ int ext2_ioctl (struct inode * inode, st +@@ -70,7 +72,8 @@ int ext2_ioctl (struct inode * inode, st case EXT2_IOC_SETVERSION: if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) return -EPERM; @@ -44,11 +52,19 @@ Index: vserver-sources-2.6.15_2.0.1/fs/ext2/ioctl.c return -EROFS; if (get_user(inode->i_generation, (int __user *) arg)) return -EFAULT; -Index: vserver-sources-2.6.15_2.0.1/fs/ext3/ioctl.c +Index: linux-2.6.15/fs/ext3/ioctl.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/ext3/ioctl.c -+++ vserver-sources-2.6.15_2.0.1/fs/ext3/ioctl.c -@@ -36,7 +36,8 @@ int ext3_ioctl (struct inode * inode, st +--- linux-2.6.15.orig/fs/ext3/ioctl.c ++++ linux-2.6.15/fs/ext3/ioctl.c +@@ -8,6 +8,7 @@ + */ + + #include <linux/fs.h> ++#include <linux/mount.h> + #include <linux/jbd.h> + #include <linux/ext3_fs.h> + #include <linux/ext3_jbd.h> +@@ -36,7 +37,8 @@ int ext3_ioctl (struct inode * inode, st unsigned int oldflags; unsigned int jflag; @@ -58,7 +74,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/ext3/ioctl.c return -EROFS; if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) -@@ -114,7 +115,8 @@ flags_err: +@@ -114,7 +116,8 @@ flags_err: if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) return -EPERM; @@ -68,7 +84,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/ext3/ioctl.c return -EROFS; if (get_user(generation, (int __user *) arg)) return -EFAULT; -@@ -168,7 +170,8 @@ flags_err: +@@ -168,7 +171,8 @@ flags_err: if (!test_opt(inode->i_sb, RESERVATION) ||!S_ISREG(inode->i_mode)) return -ENOTTY; @@ -78,7 +94,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/ext3/ioctl.c return -EROFS; if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) -@@ -203,7 +206,8 @@ flags_err: +@@ -203,7 +207,8 @@ flags_err: if (!capable(CAP_SYS_RESOURCE)) return -EPERM; @@ -88,7 +104,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/ext3/ioctl.c return -EROFS; if (get_user(n_blocks_count, (__u32 __user *)arg)) -@@ -224,7 +228,8 @@ flags_err: +@@ -224,7 +229,8 @@ flags_err: if (!capable(CAP_SYS_RESOURCE)) return -EPERM; @@ -98,10 +114,10 @@ Index: vserver-sources-2.6.15_2.0.1/fs/ext3/ioctl.c return -EROFS; if (copy_from_user(&input, (struct ext3_new_group_input __user *)arg, -Index: vserver-sources-2.6.15_2.0.1/fs/hfsplus/ioctl.c +Index: linux-2.6.15/fs/hfsplus/ioctl.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/hfsplus/ioctl.c -+++ vserver-sources-2.6.15_2.0.1/fs/hfsplus/ioctl.c +--- linux-2.6.15.orig/fs/hfsplus/ioctl.c ++++ linux-2.6.15/fs/hfsplus/ioctl.c @@ -34,7 +34,8 @@ int hfsplus_ioctl(struct inode *inode, s flags |= EXT2_FLAG_NODUMP; /* EXT2_NODUMP_FL */ return put_user(flags, (int __user *)arg); @@ -112,10 +128,10 @@ Index: vserver-sources-2.6.15_2.0.1/fs/hfsplus/ioctl.c return -EROFS; if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) -Index: vserver-sources-2.6.15_2.0.1/fs/namei.c +Index: linux-2.6.15/fs/namei.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/namei.c -+++ vserver-sources-2.6.15_2.0.1/fs/namei.c +--- linux-2.6.15.orig/fs/namei.c ++++ linux-2.6.15/fs/namei.c @@ -253,7 +253,7 @@ int permission(struct inode *inode, int /* * Nobody gets write access to a read-only fs. @@ -167,15 +183,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c if (error) return error; -@@ -1803,7 +1806,6 @@ asmlinkage long sys_mknod(const char __u - goto out; - dentry = lookup_create(&nd, 0); - error = PTR_ERR(dentry); -- - if (!IS_POSIXACL(nd.dentry->d_inode)) - mode &= ~current->fs->umask; - if (!IS_ERR(dentry)) { -@@ -1812,11 +1814,12 @@ asmlinkage long sys_mknod(const char __u +@@ -1812,11 +1815,12 @@ asmlinkage long sys_mknod(const char __u error = vfs_create(nd.dentry->d_inode,dentry,mode,&nd); break; case S_IFCHR: case S_IFBLK: @@ -191,7 +199,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c break; case S_IFDIR: error = -EPERM; -@@ -1834,9 +1837,10 @@ out: +@@ -1834,9 +1838,10 @@ out: return error; } @@ -204,7 +212,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c if (error) return error; -@@ -1875,7 +1879,8 @@ asmlinkage long sys_mkdir(const char __u +@@ -1875,7 +1880,8 @@ asmlinkage long sys_mkdir(const char __u if (!IS_ERR(dentry)) { if (!IS_POSIXACL(nd.dentry->d_inode)) mode &= ~current->fs->umask; @@ -214,7 +222,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c dput(dentry); } up(&nd.dentry->d_inode->i_sem); -@@ -1915,9 +1920,10 @@ void dentry_unhash(struct dentry *dentry +@@ -1915,9 +1921,10 @@ void dentry_unhash(struct dentry *dentry spin_unlock(&dcache_lock); } @@ -227,7 +235,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c if (error) return error; -@@ -1978,7 +1984,7 @@ asmlinkage long sys_rmdir(const char __u +@@ -1978,7 +1985,7 @@ asmlinkage long sys_rmdir(const char __u dentry = lookup_hash(&nd); error = PTR_ERR(dentry); if (!IS_ERR(dentry)) { @@ -236,7 +244,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c dput(dentry); } up(&nd.dentry->d_inode->i_sem); -@@ -1989,9 +1995,10 @@ exit: +@@ -1989,9 +1996,10 @@ exit: return error; } @@ -249,7 +257,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c if (error) return error; -@@ -2053,7 +2060,7 @@ asmlinkage long sys_unlink(const char __ +@@ -2053,7 +2061,7 @@ asmlinkage long sys_unlink(const char __ inode = dentry->d_inode; if (inode) atomic_inc(&inode->i_count); @@ -258,7 +266,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c exit2: dput(dentry); } -@@ -2072,9 +2079,10 @@ slashes: +@@ -2072,9 +2080,10 @@ slashes: goto exit2; } @@ -271,7 +279,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c if (error) return error; -@@ -2114,7 +2122,8 @@ asmlinkage long sys_symlink(const char _ +@@ -2114,7 +2123,8 @@ asmlinkage long sys_symlink(const char _ dentry = lookup_create(&nd, 0); error = PTR_ERR(dentry); if (!IS_ERR(dentry)) { @@ -281,7 +289,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c dput(dentry); } up(&nd.dentry->d_inode->i_sem); -@@ -2126,7 +2135,8 @@ out: +@@ -2126,7 +2136,8 @@ out: return error; } @@ -291,7 +299,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c { struct inode *inode = old_dentry->d_inode; int error; -@@ -2134,7 +2144,7 @@ int vfs_link(struct dentry *old_dentry, +@@ -2134,7 +2145,7 @@ int vfs_link(struct dentry *old_dentry, if (!inode) return -ENOENT; @@ -300,7 +308,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c if (error) return error; -@@ -2196,7 +2206,8 @@ asmlinkage long sys_link(const char __us +@@ -2196,7 +2207,8 @@ asmlinkage long sys_link(const char __us new_dentry = lookup_create(&nd, 0); error = PTR_ERR(new_dentry); if (!IS_ERR(new_dentry)) { @@ -310,7 +318,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c dput(new_dentry); } up(&nd.dentry->d_inode->i_sem); -@@ -2323,14 +2334,14 @@ int vfs_rename(struct inode *old_dir, st +@@ -2323,14 +2335,14 @@ int vfs_rename(struct inode *old_dir, st if (old_dentry->d_inode == new_dentry->d_inode) return 0; @@ -327,7 +335,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c if (error) return error; -@@ -2407,6 +2418,9 @@ static inline int do_rename(const char * +@@ -2407,6 +2419,9 @@ static inline int do_rename(const char * error = -EINVAL; if (old_dentry == trap) goto exit4; @@ -337,10 +345,10 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namei.c new_dentry = lookup_hash(&newnd); error = PTR_ERR(new_dentry); if (IS_ERR(new_dentry)) -Index: vserver-sources-2.6.15_2.0.1/fs/namespace.c +Index: linux-2.6.15/fs/namespace.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/namespace.c -+++ vserver-sources-2.6.15_2.0.1/fs/namespace.c +--- linux-2.6.15.orig/fs/namespace.c ++++ linux-2.6.15/fs/namespace.c @@ -378,24 +378,26 @@ static int show_vfsmnt(struct seq_file * struct vfsmount *mnt = v; int err = 0; @@ -426,7 +434,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namespace.c out: up_write(&namespace_sem); -@@ -1361,12 +1366,18 @@ long do_mount(char *dev_name, char *dir_ +@@ -1361,6 +1366,8 @@ long do_mount(char *dev_name, char *dir_ } /* Separate the per-mountpoint flags */ @@ -435,29 +443,19 @@ Index: vserver-sources-2.6.15_2.0.1/fs/namespace.c if (flags & MS_NOSUID) mnt_flags |= MNT_NOSUID; if (flags & MS_NODEV) - mnt_flags |= MNT_NODEV; - if (flags & MS_NOEXEC) - mnt_flags |= MNT_NOEXEC; -+ if (flags & MS_NOATIME) -+ mnt_flags |= MNT_NOATIME; -+ if (flags & MS_NODIRATIME) -+ mnt_flags |= MNT_NODIRATIME; - flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE); - - if (vx_ccaps(VXC_SECURE_MOUNT)) -@@ -1385,7 +1396,7 @@ long do_mount(char *dev_name, char *dir_ +@@ -1385,7 +1392,7 @@ long do_mount(char *dev_name, char *dir_ retval = do_remount(&nd, flags & ~MS_REMOUNT, mnt_flags, data_page, xid); else if (flags & MS_BIND) - retval = do_loopback(&nd, dev_name, flags & MS_REC, xid); -+ retval = do_loopback(&nd, dev_name, flags & MS_REC, xid, mnt_flags); ++ retval = do_loopback(&nd, dev_name, xid, flags, mnt_flags); else if (flags & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE)) retval = do_change_type(&nd, flags); else if (flags & MS_MOVE) -Index: vserver-sources-2.6.15_2.0.1/fs/nfs/dir.c +Index: linux-2.6.15/fs/nfs/dir.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/nfs/dir.c -+++ vserver-sources-2.6.15_2.0.1/fs/nfs/dir.c +--- linux-2.6.15.orig/fs/nfs/dir.c ++++ linux-2.6.15/fs/nfs/dir.c @@ -904,7 +904,8 @@ static int is_atomic_open(struct inode * if (nd->flags & LOOKUP_DIRECTORY) return 0; @@ -468,10 +466,10 @@ Index: vserver-sources-2.6.15_2.0.1/fs/nfs/dir.c return 0; return 1; } -Index: vserver-sources-2.6.15_2.0.1/fs/nfsd/vfs.c +Index: linux-2.6.15/fs/nfsd/vfs.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/nfsd/vfs.c -+++ vserver-sources-2.6.15_2.0.1/fs/nfsd/vfs.c +--- linux-2.6.15.orig/fs/nfsd/vfs.c ++++ linux-2.6.15/fs/nfsd/vfs.c @@ -1161,13 +1161,13 @@ nfsd_create(struct svc_rqst *rqstp, stru err = vfs_create(dirp, dchild, iap->ia_mode, NULL); break; @@ -535,10 +533,10 @@ Index: vserver-sources-2.6.15_2.0.1/fs/nfsd/vfs.c return nfserr_rofs; if (/* (acc & MAY_WRITE) && */ IS_IMMUTABLE(inode)) return nfserr_perm; -Index: vserver-sources-2.6.15_2.0.1/fs/open.c +Index: linux-2.6.15/fs/open.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/open.c -+++ vserver-sources-2.6.15_2.0.1/fs/open.c +--- linux-2.6.15.orig/fs/open.c ++++ linux-2.6.15/fs/open.c @@ -250,7 +250,7 @@ static inline long do_sys_truncate(const goto dput_and_out; @@ -640,22 +638,29 @@ Index: vserver-sources-2.6.15_2.0.1/fs/open.c fput(file); } return error; -Index: vserver-sources-2.6.15_2.0.1/fs/reiserfs/ioctl.c +Index: linux-2.6.15/fs/reiserfs/ioctl.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/reiserfs/ioctl.c -+++ vserver-sources-2.6.15_2.0.1/fs/reiserfs/ioctl.c -@@ -47,8 +47,8 @@ int reiserfs_ioctl(struct inode *inode, +--- linux-2.6.15.orig/fs/reiserfs/ioctl.c ++++ linux-2.6.15/fs/reiserfs/ioctl.c +@@ -3,6 +3,7 @@ + */ + + #include <linux/fs.h> ++#include <linux/mount.h> + #include <linux/reiserfs_fs.h> + #include <linux/time.h> + #include <asm/uaccess.h> +@@ -47,7 +48,8 @@ int reiserfs_ioctl(struct inode *inode, if (!reiserfs_attrs(inode->i_sb)) return -ENOTTY; - if (IS_RDONLY(inode)) -- return -EROFS; + if (IS_RDONLY(inode) || + (filp && MNT_IS_RDONLY(filp->f_vfsmnt))) + return -EROFS; if ((current->fsuid != inode->i_uid) - && !capable(CAP_FOWNER)) -@@ -87,7 +87,8 @@ int reiserfs_ioctl(struct inode *inode, +@@ -87,7 +89,8 @@ int reiserfs_ioctl(struct inode *inode, case REISERFS_IOC_SETVERSION: if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) return -EPERM; @@ -665,11 +670,19 @@ Index: vserver-sources-2.6.15_2.0.1/fs/reiserfs/ioctl.c return -EROFS; if (get_user(inode->i_generation, (int __user *)arg)) return -EFAULT; -Index: vserver-sources-2.6.15_2.0.1/fs/reiserfs/xattr.c +Index: linux-2.6.15/fs/reiserfs/xattr.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/reiserfs/xattr.c -+++ vserver-sources-2.6.15_2.0.1/fs/reiserfs/xattr.c -@@ -835,7 +835,7 @@ int reiserfs_delete_xattrs(struct inode +--- linux-2.6.15.orig/fs/reiserfs/xattr.c ++++ linux-2.6.15/fs/reiserfs/xattr.c +@@ -34,6 +34,7 @@ + #include <linux/namei.h> + #include <linux/errno.h> + #include <linux/fs.h> ++#include <linux/mount.h> + #include <linux/file.h> + #include <linux/pagemap.h> + #include <linux/xattr.h> +@@ -835,7 +836,7 @@ int reiserfs_delete_xattrs(struct inode if (dir->d_inode->i_nlink <= 2) { root = get_xa_root(inode->i_sb); reiserfs_write_lock_xattrs(inode->i_sb); @@ -678,7 +691,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/reiserfs/xattr.c reiserfs_write_unlock_xattrs(inode->i_sb); dput(root); } else { -@@ -1352,7 +1352,7 @@ __reiserfs_permission(struct inode *inod +@@ -1352,7 +1353,7 @@ __reiserfs_permission(struct inode *inod /* * Nobody gets write access to a read-only fs. */ @@ -687,11 +700,19 @@ Index: vserver-sources-2.6.15_2.0.1/fs/reiserfs/xattr.c (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))) return -EROFS; -Index: vserver-sources-2.6.15_2.0.1/fs/xattr.c +Index: linux-2.6.15/fs/xattr.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/fs/xattr.c -+++ vserver-sources-2.6.15_2.0.1/fs/xattr.c -@@ -24,7 +24,7 @@ +--- linux-2.6.15.orig/fs/xattr.c ++++ linux-2.6.15/fs/xattr.c +@@ -17,6 +17,7 @@ + #include <linux/syscalls.h> + #include <linux/module.h> + #include <linux/fsnotify.h> ++#include <linux/mount.h> + #include <asm/uaccess.h> + + /* +@@ -24,7 +25,7 @@ */ static long setxattr(struct dentry *d, char __user *name, void __user *value, @@ -700,17 +721,17 @@ Index: vserver-sources-2.6.15_2.0.1/fs/xattr.c { int error; void *kvalue = NULL; -@@ -55,6 +55,9 @@ setxattr(struct dentry *d, char __user * +@@ -51,6 +52,9 @@ setxattr(struct dentry *d, char __user * + } + } + ++ if (MNT_IS_RDONLY(mnt)) ++ return -EROFS; ++ + down(&d->d_inode->i_sem); error = security_inode_setxattr(d, kname, kvalue, size, flags); if (error) - goto out; -+ error = -EROFS; -+ if (MNT_IS_RDONLY(mnt)) -+ goto out; - error = -EOPNOTSUPP; - if (d->d_inode->i_op && d->d_inode->i_op->setxattr) { - error = d->d_inode->i_op->setxattr(d, kname, kvalue, -@@ -88,7 +91,7 @@ sys_setxattr(char __user *path, char __u +@@ -88,7 +92,7 @@ sys_setxattr(char __user *path, char __u error = user_path_walk(path, &nd); if (error) return error; @@ -719,7 +740,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/xattr.c path_release(&nd); return error; } -@@ -103,7 +106,7 @@ sys_lsetxattr(char __user *path, char __ +@@ -103,7 +107,7 @@ sys_lsetxattr(char __user *path, char __ error = user_path_walk_link(path, &nd); if (error) return error; @@ -728,7 +749,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/xattr.c path_release(&nd); return error; } -@@ -118,7 +121,7 @@ sys_fsetxattr(int fd, char __user *name, +@@ -118,7 +122,7 @@ sys_fsetxattr(int fd, char __user *name, f = fget(fd); if (!f) return error; @@ -737,7 +758,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/xattr.c fput(f); return error; } -@@ -307,7 +310,7 @@ sys_flistxattr(int fd, char __user *list +@@ -307,7 +311,7 @@ sys_flistxattr(int fd, char __user *list * Extended attribute REMOVE operations */ static long @@ -746,17 +767,17 @@ Index: vserver-sources-2.6.15_2.0.1/fs/xattr.c { int error; char kname[XATTR_NAME_MAX + 1]; -@@ -323,6 +326,9 @@ removexattr(struct dentry *d, char __use +@@ -318,6 +322,9 @@ removexattr(struct dentry *d, char __use + if (error < 0) + return error; + ++ if (MNT_IS_RDONLY(mnt)) ++ return -EROFS; ++ + error = -EOPNOTSUPP; + if (d->d_inode->i_op && d->d_inode->i_op->removexattr) { error = security_inode_removexattr(d, kname); - if (error) - goto out; -+ error = -EROFS; -+ if (MNT_IS_RDONLY(mnt)) -+ goto out; - down(&d->d_inode->i_sem); - error = d->d_inode->i_op->removexattr(d, kname); - up(&d->d_inode->i_sem); -@@ -342,7 +348,7 @@ sys_removexattr(char __user *path, char +@@ -342,7 +349,7 @@ sys_removexattr(char __user *path, char error = user_path_walk(path, &nd); if (error) return error; @@ -765,7 +786,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/xattr.c path_release(&nd); return error; } -@@ -356,7 +362,7 @@ sys_lremovexattr(char __user *path, char +@@ -356,7 +363,7 @@ sys_lremovexattr(char __user *path, char error = user_path_walk_link(path, &nd); if (error) return error; @@ -774,7 +795,7 @@ Index: vserver-sources-2.6.15_2.0.1/fs/xattr.c path_release(&nd); return error; } -@@ -370,7 +376,7 @@ sys_fremovexattr(int fd, char __user *na +@@ -370,7 +377,7 @@ sys_fremovexattr(int fd, char __user *na f = fget(fd); if (!f) return error; @@ -783,19 +804,11 @@ Index: vserver-sources-2.6.15_2.0.1/fs/xattr.c fput(f); return error; } -Index: vserver-sources-2.6.15_2.0.1/include/linux/fs.h +Index: linux-2.6.15/include/linux/fs.h =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/include/linux/fs.h -+++ vserver-sources-2.6.15_2.0.1/include/linux/fs.h -@@ -10,6 +10,7 @@ - #include <linux/limits.h> - #include <linux/ioctl.h> - #include <linux/rcuref.h> -+#include <linux/mount.h> - - /* - * It's silly to have NR_OPEN bigger than NR_FILE, but you can change -@@ -156,7 +157,7 @@ extern int dir_notify_enable; +--- linux-2.6.15.orig/include/linux/fs.h ++++ linux-2.6.15/include/linux/fs.h +@@ -156,7 +156,7 @@ extern int dir_notify_enable; */ #define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg)) @@ -804,7 +817,7 @@ Index: vserver-sources-2.6.15_2.0.1/include/linux/fs.h #define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || \ ((inode)->i_flags & S_SYNC)) #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ -@@ -892,12 +893,12 @@ static inline void unlock_super(struct s +@@ -892,12 +892,12 @@ static inline void unlock_super(struct s */ extern int vfs_permission(struct nameidata *, int); extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); @@ -823,36 +836,20 @@ Index: vserver-sources-2.6.15_2.0.1/include/linux/fs.h extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); /* -@@ -1104,8 +1105,16 @@ static inline void mark_inode_dirty_sync - - static inline void touch_atime(struct vfsmount *mnt, struct dentry *dentry) - { -- /* per-mountpoint checks will go here */ -- update_atime(dentry->d_inode); -+ struct inode *inode = dentry->d_inode; -+ -+ if (MNT_IS_NOATIME(mnt)) -+ return; -+ if (S_ISDIR(inode->i_mode) && MNT_IS_NODIRATIME(mnt)) -+ return; -+ if (IS_RDONLY(inode) || MNT_IS_RDONLY(mnt)) -+ return; -+ -+ update_atime(inode); - } - - static inline void file_accessed(struct file *file) -Index: vserver-sources-2.6.15_2.0.1/include/linux/mount.h +Index: linux-2.6.15/include/linux/mount.h =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/include/linux/mount.h -+++ vserver-sources-2.6.15_2.0.1/include/linux/mount.h -@@ -23,6 +23,9 @@ +--- linux-2.6.15.orig/include/linux/mount.h ++++ linux-2.6.15/include/linux/mount.h +@@ -20,9 +20,12 @@ + #define MNT_NOSUID 0x01 + #define MNT_NODEV 0x02 + #define MNT_NOEXEC 0x04 ++#define MNT_RDONLY 0x08 #define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */ #define MNT_UNBINDABLE 0x20 /* if the vfsmount is a unbindable mount */ #define MNT_PNODE_MASK 0x30 /* propogation flag mask */ -+#define MNT_RDONLY 0x40 -+#define MNT_NOATIME 0x50 -+#define MNT_NODIRATIME 0x60 ++#define MNT_NOATIME 0x40 ++#define MNT_NODIRATIME 0x80 #define MNT_XID 0x100 struct vfsmount { @@ -867,10 +864,10 @@ Index: vserver-sources-2.6.15_2.0.1/include/linux/mount.h static inline struct vfsmount *mntget(struct vfsmount *mnt) { if (mnt) -Index: vserver-sources-2.6.15_2.0.1/ipc/mqueue.c +Index: linux-2.6.15/ipc/mqueue.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/ipc/mqueue.c -+++ vserver-sources-2.6.15_2.0.1/ipc/mqueue.c +--- linux-2.6.15.orig/ipc/mqueue.c ++++ linux-2.6.15/ipc/mqueue.c @@ -746,7 +746,7 @@ asmlinkage long sys_mq_unlink(const char if (inode) atomic_inc(&inode->i_count); @@ -880,10 +877,10 @@ Index: vserver-sources-2.6.15_2.0.1/ipc/mqueue.c out_err: dput(dentry); -Index: vserver-sources-2.6.15_2.0.1/net/unix/af_unix.c +Index: linux-2.6.15/net/unix/af_unix.c =================================================================== ---- vserver-sources-2.6.15_2.0.1.orig/net/unix/af_unix.c -+++ vserver-sources-2.6.15_2.0.1/net/unix/af_unix.c +--- linux-2.6.15.orig/net/unix/af_unix.c ++++ linux-2.6.15/net/unix/af_unix.c @@ -784,7 +784,7 @@ static int unix_bind(struct socket *sock */ mode = S_IFSOCK | |