[kernel] generic-2.6/2.6.30: more mini_fo fixes
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 5 Jun 2009 15:24:59 +0000 (15:24 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 5 Jun 2009 15:24:59 +0000 (15:24 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16346 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/generic-2.6/patches-2.6.30/215-mini_fo_2.6.30.patch

index ca122d9..2d20920 100644 (file)
  
        /* catch error in lookup */
        if (IS_ERR(hidden_dentry) || IS_ERR(hidden_sto_dentry)) {
+@@ -553,9 +559,11 @@ mini_fo_rmdir(inode_t *dir, dentry_t *de
+ #endif
+               /* Delete an old WOL file contained in the storage dir */
++              mutex_lock(&hidden_sto_dentry->d_inode->i_mutex);
+               meta_dentry = lookup_one_len(META_FILENAME,
+                                            hidden_sto_dentry,
+                                            strlen(META_FILENAME));
++              mutex_unlock(&hidden_sto_dentry->d_inode->i_mutex);
+               if(meta_dentry->d_inode) {
+                       err = vfs_unlink(hidden_sto_dentry->d_inode, meta_dentry);
+                       dput(meta_dentry);
+@@ -643,9 +651,11 @@ mini_fo_rmdir(inode_t *dir, dentry_t *de
+ #endif
+               /* Delete an old WOL file contained in the storage dir */
++              mutex_lock(&hidden_sto_dentry->d_inode->i_mutex);
+               meta_dentry = lookup_one_len(META_FILENAME,
+                                            hidden_sto_dentry,
+                                            strlen(META_FILENAME));
++              mutex_unlock(&hidden_sto_dentry->d_inode->i_mutex);
+               if(meta_dentry->d_inode) {
+                       /* is this necessary? dget(meta_dentry); */
+                       err = vfs_unlink(hidden_sto_dentry->d_inode,
+@@ -688,9 +698,11 @@ mini_fo_rmdir(inode_t *dir, dentry_t *de
+ #endif
+               /* Delete an old WOL file contained in the storage dir */
++              mutex_lock(&hidden_sto_dentry->d_inode->i_mutex);
+               meta_dentry = lookup_one_len(META_FILENAME,
+                                            hidden_sto_dentry,
+                                            strlen(META_FILENAME));
++              mutex_unlock(&hidden_sto_dentry->d_inode->i_mutex);
+               if(meta_dentry->d_inode) {
+                       /* is this necessary? dget(meta_dentry); */
+                       err = vfs_unlink(hidden_sto_dentry->d_inode,
 --- a/fs/mini_fo/meta.c
 +++ b/fs/mini_fo/meta.c
 @@ -43,9 +43,11 @@ int meta_build_lists(dentry_t *dentry)
          if(!meta_dentry->d_inode) {
                  /* We need to create a META-file */
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-@@ -641,9 +650,14 @@ int meta_sync_d_list(dentry_t *dentry, i
+@@ -641,9 +650,13 @@ int meta_sync_d_list(dentry_t *dentry, i
                        goto out;
                  }
          }
                                     dtohd2(dentry),
                                     strlen(META_FILENAME));
 +      mutex_unlock(&dtohd2(dentry)->d_inode->i_mutex);
-+
 +
          if(!meta_dentry->d_inode) {
                  /* We need to create a META-file */
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-@@ -784,9 +798,13 @@ int meta_sync_r_list(dentry_t *dentry, i
+@@ -784,9 +797,13 @@ int meta_sync_r_list(dentry_t *dentry, i
                        goto out;
                  }
          }
This page took 0.027133 seconds and 4 git commands to generate.