From: alex Date: Sun, 14 Sep 2003 13:38:59 +0000 (+0000) Subject: - fix against bug 1935 (OOPS in removing current working directory) X-Git-Tag: v1_7_0_51~2^7~543 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=716f278d7a1cc6b7cf159c9769629898d4173978;p=fs%2Flustre-release.git - fix against bug 1935 (OOPS in removing current working directory) --- diff --git a/lustre/kernel_patches/patches/vfs_intent-2.4.18-18-chaos65.patch b/lustre/kernel_patches/patches/vfs_intent-2.4.18-18-chaos65.patch index dce4342..7f16189 100644 --- a/lustre/kernel_patches/patches/vfs_intent-2.4.18-18-chaos65.patch +++ b/lustre/kernel_patches/patches/vfs_intent-2.4.18-18-chaos65.patch @@ -3,16 +3,16 @@ fs/namei.c | 328 +++++++++++++++++++++++++++++++++++++++++-------- fs/namespace.c | 28 +++- fs/open.c | 167 ++++++++++++++++++------ - fs/stat.c | 27 ++-- + fs/stat.c | 29 ++-- include/linux/dcache.h | 60 ++++++++ include/linux/fs.h | 34 ++++- kernel/exit.c | 3 kernel/fork.c | 3 kernel/ksyms.c | 1 - 11 files changed, 562 insertions(+), 126 deletions(-) + 11 files changed, 564 insertions(+), 126 deletions(-) --- linux-2.4.18-chaos/fs/exec.c~vfs_intent-2.4.18-18-chaos65 2003-07-28 17:52:03.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/fs/exec.c 2003-09-13 16:52:08.000000000 +0400 ++++ linux-2.4.18-chaos-alexey/fs/exec.c 2003-09-14 17:25:41.000000000 +0400 @@ -117,8 +117,10 @@ asmlinkage long sys_uselib(const char * struct file * file; struct nameidata nd; @@ -75,7 +75,7 @@ retval = binfmt->core_dump(signr, regs, file); --- linux-2.4.18-chaos/fs/dcache.c~vfs_intent-2.4.18-18-chaos65 2003-07-28 17:52:03.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/fs/dcache.c 2003-09-13 16:52:08.000000000 +0400 ++++ linux-2.4.18-chaos-alexey/fs/dcache.c 2003-09-14 17:25:41.000000000 +0400 @@ -186,6 +186,13 @@ int d_invalidate(struct dentry * dentry) spin_unlock(&dcache_lock); return 0; @@ -114,7 +114,7 @@ #define do_switch(x,y) do { \ --- linux-2.4.18-chaos/fs/namespace.c~vfs_intent-2.4.18-18-chaos65 2003-07-28 17:52:05.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/fs/namespace.c 2003-09-13 16:52:08.000000000 +0400 ++++ linux-2.4.18-chaos-alexey/fs/namespace.c 2003-09-14 17:25:41.000000000 +0400 @@ -99,6 +99,7 @@ static void detach_mnt(struct vfsmount * { old_nd->dentry = mnt->mnt_mountpoint; @@ -229,7 +229,7 @@ out0: unlock_kernel(); --- linux-2.4.18-chaos/fs/namei.c~vfs_intent-2.4.18-18-chaos65 2003-07-28 17:52:05.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/fs/namei.c 2003-09-13 16:54:20.000000000 +0400 ++++ linux-2.4.18-chaos-alexey/fs/namei.c 2003-09-14 17:25:41.000000000 +0400 @@ -94,6 +94,13 @@ * XEmacs seems to be relying on it... */ @@ -1023,7 +1023,7 @@ kunmap(page); page_cache_release(page); --- linux-2.4.18-chaos/fs/open.c~vfs_intent-2.4.18-18-chaos65 2003-07-28 17:52:06.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/fs/open.c 2003-09-13 16:52:08.000000000 +0400 ++++ linux-2.4.18-chaos-alexey/fs/open.c 2003-09-14 17:25:41.000000000 +0400 @@ -19,6 +19,8 @@ #include @@ -1417,8 +1417,8 @@ * Find an empty file descriptor entry, and mark it busy. */ --- linux-2.4.18-chaos/fs/stat.c~vfs_intent-2.4.18-18-chaos65 2003-07-28 17:52:06.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/fs/stat.c 2003-09-13 16:52:08.000000000 +0400 -@@ -17,21 +17,24 @@ ++++ linux-2.4.18-chaos-alexey/fs/stat.c 2003-09-14 17:30:21.000000000 +0400 +@@ -17,21 +17,26 @@ * Revalidate the inode. This is required for proper NFS attribute caching. */ static __inline__ int @@ -1427,6 +1427,8 @@ { struct inode * inode = dentry->d_inode; - if (inode->i_op && inode->i_op->revalidate) ++ if (!inode) ++ return -ENOENT; + if (inode->i_op && inode->i_op->revalidate_it) + return inode->i_op->revalidate_it(dentry, it); + else if (inode->i_op && inode->i_op->revalidate) @@ -1447,7 +1449,7 @@ if (res) return res; -@@ -104,10 +107,12 @@ int vfs_stat(char *name, struct kstat *s +@@ -104,10 +109,12 @@ int vfs_stat(char *name, struct kstat *s { struct nameidata nd; int error; @@ -1462,7 +1464,7 @@ path_release(&nd); } return error; -@@ -117,10 +122,12 @@ int vfs_lstat(char *name, struct kstat * +@@ -117,10 +124,12 @@ int vfs_lstat(char *name, struct kstat * { struct nameidata nd; int error; @@ -1477,7 +1479,7 @@ path_release(&nd); } return error; -@@ -132,7 +139,7 @@ int vfs_fstat(unsigned int fd, struct ks +@@ -132,7 +141,7 @@ int vfs_fstat(unsigned int fd, struct ks int error = -EBADF; if (f) { @@ -1486,7 +1488,7 @@ fput(f); } return error; -@@ -279,7 +286,7 @@ asmlinkage long sys_readlink(const char +@@ -279,7 +288,7 @@ asmlinkage long sys_readlink(const char error = -EINVAL; if (inode->i_op && inode->i_op->readlink && @@ -1496,7 +1498,7 @@ error = inode->i_op->readlink(nd.dentry, buf, bufsiz); } --- linux-2.4.18-chaos/include/linux/dcache.h~vfs_intent-2.4.18-18-chaos65 2003-07-28 17:52:16.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/include/linux/dcache.h 2003-09-13 16:52:08.000000000 +0400 ++++ linux-2.4.18-chaos-alexey/include/linux/dcache.h 2003-09-14 17:25:41.000000000 +0400 @@ -5,6 +5,51 @@ #include @@ -1580,8 +1582,8 @@ extern spinlock_t dcache_lock; ---- linux-2.4.18-chaos/include/linux/fs.h~vfs_intent-2.4.18-18-chaos65 2003-09-13 16:52:06.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/include/linux/fs.h 2003-09-13 16:52:08.000000000 +0400 +--- linux-2.4.18-chaos/include/linux/fs.h~vfs_intent-2.4.18-18-chaos65 2003-09-14 17:24:21.000000000 +0400 ++++ linux-2.4.18-chaos-alexey/include/linux/fs.h 2003-09-14 17:25:41.000000000 +0400 @@ -73,6 +73,7 @@ extern int leases_enable, dir_notify_ena #define FMODE_READ 1 @@ -1715,7 +1717,7 @@ extern int page_follow_link(struct dentry *, struct nameidata *); extern struct inode_operations page_symlink_inode_operations; --- linux-2.4.18-chaos/kernel/fork.c~vfs_intent-2.4.18-18-chaos65 2003-07-28 17:52:20.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/kernel/fork.c 2003-09-13 16:52:08.000000000 +0400 ++++ linux-2.4.18-chaos-alexey/kernel/fork.c 2003-09-14 17:25:41.000000000 +0400 @@ -399,10 +399,13 @@ static inline struct fs_struct *__copy_f fs->umask = old->umask; read_lock(&old->lock); @@ -1731,7 +1733,7 @@ fs->altroot = dget(old->altroot); } else { --- linux-2.4.18-chaos/kernel/exit.c~vfs_intent-2.4.18-18-chaos65 2003-07-28 17:52:20.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/kernel/exit.c 2003-09-13 16:52:08.000000000 +0400 ++++ linux-2.4.18-chaos-alexey/kernel/exit.c 2003-09-14 17:25:41.000000000 +0400 @@ -303,11 +303,14 @@ static inline void __put_fs_struct(struc { /* No need to hold fs->lock if we are killing it */ @@ -1747,8 +1749,8 @@ dput(fs->altroot); mntput(fs->altrootmnt); } ---- linux-2.4.18-chaos/kernel/ksyms.c~vfs_intent-2.4.18-18-chaos65 2003-09-13 16:52:06.000000000 +0400 -+++ linux-2.4.18-chaos-alexey/kernel/ksyms.c 2003-09-13 16:52:08.000000000 +0400 +--- linux-2.4.18-chaos/kernel/ksyms.c~vfs_intent-2.4.18-18-chaos65 2003-09-14 17:24:22.000000000 +0400 ++++ linux-2.4.18-chaos-alexey/kernel/ksyms.c 2003-09-14 17:25:41.000000000 +0400 @@ -294,6 +294,7 @@ EXPORT_SYMBOL(read_cache_page); EXPORT_SYMBOL(set_page_dirty); EXPORT_SYMBOL(vfs_readlink);