summaryrefslogtreecommitdiff
path: root/target/linux/generic/patches-2.6.36/215-mini_fo_2.6.30.patch
diff options
context:
space:
mode:
authorAlexandros C. Couloumbis <alex@ozo.com>2010-08-29 14:35:23 +0000
committerAlexandros C. Couloumbis <alex@ozo.com>2010-08-29 14:35:23 +0000
commit206e5f313e425c2b727b64a023a62c1f3de59b72 (patch)
treed7d49f33d5b291ac9f72b066866fdc293cf47dc7 /target/linux/generic/patches-2.6.36/215-mini_fo_2.6.30.patch
parent28d7de48b8c1150b5d72da89a9fb51f271843579 (diff)
downloadmtk-20170518-206e5f313e425c2b727b64a023a62c1f3de59b72.zip
mtk-20170518-206e5f313e425c2b727b64a023a62c1f3de59b72.tar.gz
mtk-20170518-206e5f313e425c2b727b64a023a62c1f3de59b72.tar.bz2
linux/generic: add kernel 2.6.36 preliminary support
SVN-Revision: 22832
Diffstat (limited to 'target/linux/generic/patches-2.6.36/215-mini_fo_2.6.30.patch')
-rw-r--r--target/linux/generic/patches-2.6.36/215-mini_fo_2.6.30.patch157
1 files changed, 157 insertions, 0 deletions
diff --git a/target/linux/generic/patches-2.6.36/215-mini_fo_2.6.30.patch b/target/linux/generic/patches-2.6.36/215-mini_fo_2.6.30.patch
new file mode 100644
index 0000000..2d20920
--- /dev/null
+++ b/target/linux/generic/patches-2.6.36/215-mini_fo_2.6.30.patch
@@ -0,0 +1,157 @@
+--- a/fs/mini_fo/aux.c
++++ b/fs/mini_fo/aux.c
+@@ -86,8 +86,10 @@ int get_neg_sto_dentry(dentry_t *dentry)
+ len = dentry->d_name.len;
+ name = dentry->d_name.name;
+
++ mutex_lock(&dtohd2(dentry->d_parent)->d_inode->i_mutex);
+ dtohd2(dentry) =
+ lookup_one_len(name, dtohd2(dentry->d_parent), len);
++ mutex_unlock(&dtohd2(dentry->d_parent)->d_inode->i_mutex);
+
+ out:
+ return err;
+@@ -426,7 +428,9 @@ int build_sto_structure(dentry_t *dir, d
+ const unsigned char *name;
+ len = dtohd(dentry)->d_name.len;
+ name = dtohd(dentry)->d_name.name;
++ mutex_lock(&dtohd2(dir)->d_inode->i_mutex);
+ hidden_sto_dentry = lookup_one_len(name, dtohd2(dir), len);
++ mutex_unlock(&dtohd2(dir)->d_inode->i_mutex);
+ dtohd2(dentry) = hidden_sto_dentry;
+ }
+
+--- a/fs/mini_fo/inode.c
++++ b/fs/mini_fo/inode.c
+@@ -113,17 +113,23 @@ mini_fo_lookup(inode_t *dir, dentry_t *d
+ hidden_dir_dentry = hidden_dentry->d_parent;
+ kfree(bpath);
+ }
+- else if(hidden_dir_dentry && hidden_dir_dentry->d_inode)
++ else if(hidden_dir_dentry && hidden_dir_dentry->d_inode) {
++ mutex_lock(&hidden_dir_dentry->d_inode->i_mutex);
+ hidden_dentry =
+ lookup_one_len(name, hidden_dir_dentry, namelen);
+- else
++ mutex_unlock(&hidden_dir_dentry->d_inode->i_mutex);
++ } else {
+ hidden_dentry = NULL;
++ }
+
+- if(hidden_sto_dir_dentry && hidden_sto_dir_dentry->d_inode)
++ if(hidden_sto_dir_dentry && hidden_sto_dir_dentry->d_inode) {
++ mutex_lock(&hidden_sto_dir_dentry->d_inode->i_mutex);
+ hidden_sto_dentry =
+ lookup_one_len(name, hidden_sto_dir_dentry, namelen);
+- else
++ mutex_unlock(&hidden_sto_dir_dentry->d_inode->i_mutex);
++ } else {
+ hidden_sto_dentry = NULL;
++ }
+
+ /* 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)
+
+ /* might there be a META-file? */
+ if(dtohd2(dentry) && dtohd2(dentry)->d_inode) {
++ mutex_lock(&dtohd2(dentry)->d_inode->i_mutex);
+ meta_dentry = lookup_one_len(META_FILENAME,
+ dtohd2(dentry),
+ strlen(META_FILENAME));
++ mutex_unlock(&dtohd2(dentry)->d_inode->i_mutex);
+ if(!meta_dentry->d_inode) {
+ dput(meta_dentry);
+ goto out_ok;
+@@ -426,8 +428,11 @@ int meta_write_d_entry(dentry_t *dentry,
+ goto out;
+ }
+ }
++
++ mutex_lock(&dtohd2(dentry)->d_inode->i_mutex);
+ meta_dentry = lookup_one_len(META_FILENAME,
+ dtohd2(dentry), strlen (META_FILENAME));
++ mutex_unlock(&dtohd2(dentry)->d_inode->i_mutex);
+
+ /* We need to create a META-file */
+ if(!meta_dentry->d_inode) {
+@@ -527,9 +532,13 @@ int meta_write_r_entry(dentry_t *dentry,
+ goto out;
+ }
+ }
++
++ mutex_lock(&dtohd2(dentry)->d_inode->i_mutex);
+ meta_dentry = lookup_one_len(META_FILENAME,
+ 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)
+@@ -641,9 +650,13 @@ int meta_sync_d_list(dentry_t *dentry, i
+ goto out;
+ }
+ }
++
++ mutex_lock(&dtohd2(dentry)->d_inode->i_mutex);
+ meta_dentry = lookup_one_len(META_FILENAME,
+ 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 +797,13 @@ int meta_sync_r_list(dentry_t *dentry, i
+ goto out;
+ }
+ }
++
++ mutex_lock(&dtohd2(dentry)->d_inode->i_mutex);
+ meta_dentry = lookup_one_len(META_FILENAME,
+ 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)