Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / ext3-delete_thread-2.4.24.patch
index 6059aba..61bad1b 100644 (file)
@@ -9,7 +9,7 @@ Index: linux-2.4.24/fs/ext3/super.c
 ===================================================================
 --- linux-2.4.24.orig/fs/ext3/super.c  2004-01-12 20:36:31.000000000 +0300
 +++ linux-2.4.24/fs/ext3/super.c       2004-01-13 16:27:43.000000000 +0300
-@@ -400,6 +400,128 @@
+@@ -400,6 +400,127 @@
        }
  }
  
@@ -27,8 +27,6 @@ Index: linux-2.4.24/fs/ext3/super.c
 +      struct super_block *sb = data;
 +      struct ext3_sb_info *sbi = EXT3_SB(sb);
 +      struct task_struct *tsk = current;
-+      struct inode *inode;
-+      unsigned long blocks;
 +
 +      /* Almost like daemonize, but not quite */
 +      exit_mm(current);
@@ -68,9 +66,10 @@ Index: linux-2.4.24/fs/ext3/super.c
 +              }
 +
 +              while (!list_empty(&sbi->s_delete_list)) {
-+                      inode = list_entry(sbi->s_delete_list.next,
-+                                             struct inode, i_devices);
-+                      blocks = inode->i_blocks >> (inode->i_blkbits - 9);
++                      struct inode *inode=list_entry(sbi->s_delete_list.next,
++                                                     struct inode, i_devices);
++                      unsigned long blocks = inode->i_blocks >>
++                                                      (inode->i_blkbits - 9);
 +
 +                      list_del_init(&inode->i_devices);
 +                      spin_unlock(&sbi->s_delete_lock);
@@ -138,11 +137,13 @@ Index: linux-2.4.24/fs/ext3/super.c
  void ext3_put_super (struct super_block * sb)
  {
        struct ext3_sb_info *sbi = EXT3_SB(sb);
-@@ -407,6 +529,7 @@
+@@ -407,6 +529,9 @@
        kdev_t j_dev = sbi->s_journal->j_dev;
        int i;
  
++#ifdef EXT3_DELETE_THREAD
 +      J_ASSERT(sbi->s_delete_inodes == 0);
++#endif
        ext3_xattr_put_super(sb);
        journal_destroy(sbi->s_journal);
        if (!(sb->s_flags & MS_RDONLY)) {
@@ -335,16 +336,17 @@ Index: linux-2.4.24/fs/ext3/namei.c
 ===================================================================
 --- linux-2.4.24.orig/fs/ext3/namei.c  2004-01-12 20:36:31.000000000 +0300
 +++ linux-2.4.24/fs/ext3/namei.c       2004-01-12 20:36:32.000000000 +0300
-@@ -1936,6 +1936,36 @@
+@@ -1936,6 +1936,40 @@
        return retval;
  }
  
++#ifdef EXT3_DELETE_THREAD
 +static int ext3_try_to_delay_deletion(struct inode *inode)
 +{
 +      struct ext3_sb_info *sbi = EXT3_SB(inode->i_sb);
 +      struct ext3_inode_info *ei = EXT3_I(inode);
 +      unsigned long blocks;
-+      
++
 +      if (!test_opt(inode->i_sb, ASYNCDEL))
 +              return 0;
 +
@@ -363,11 +365,14 @@ Index: linux-2.4.24/fs/ext3/namei.c
 +      sbi->s_delete_blocks += blocks;
 +      sbi->s_delete_inodes++;
 +      spin_unlock(&sbi->s_delete_lock);
-+      
++
 +      wake_up(&sbi->s_delete_thread_queue);
 +
 +      return 0;
 +}
++#else
++#define ext3_try_to_delay_deletion(inode) do {} while (0)
++#endif
 +
  static int ext3_unlink(struct inode * dir, struct dentry *dentry)
  {