Whamcloud - gitweb
- fix against bug 1935 (OOPS in removing current working directory)
authoralex <alex>
Sun, 14 Sep 2003 13:38:59 +0000 (13:38 +0000)
committeralex <alex>
Sun, 14 Sep 2003 13:38:59 +0000 (13:38 +0000)
lustre/kernel_patches/patches/vfs_intent-2.4.18-18-chaos65.patch

index dce4342..7f16189 100644 (file)
@@ -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;
  
  #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;
  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...
   */
                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 <asm/uaccess.h>
  
   * 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
  {
        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)
        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;
                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;
                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) {
                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 &&
                        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 <asm/atomic.h>
  
  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
  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);
                        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 */
                        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);