summaryrefslogtreecommitdiff
path: root/target/linux/generic-2.6/patches-2.6.25/211-mini_fo_2.6.25_dentry_open_war.patch
blob: 14a9f37666924618eace41322f5014978ad40da9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--- a/fs/mini_fo/meta.c
+++ b/fs/mini_fo/meta.c
@@ -442,6 +442,11 @@
 			   S_IRUSR | S_IWUSR);
 #endif
 	}
+
+	/* $%& err, is this correct? */
+	meta_mnt = stopd(dentry->d_inode->i_sb)->hidden_mnt2;
+	mntget(meta_mnt);
+
         /* open META-file for writing */
         meta_file = dentry_open(meta_dentry, meta_mnt, 0x1);
         if(!meta_file || IS_ERR(meta_file)) {
@@ -535,6 +540,11 @@
 			   meta_dentry, S_IRUSR | S_IWUSR);
 #endif
 	}
+
+	/* $%& err, is this correct? */
+	meta_mnt = stopd(dentry->d_inode->i_sb)->hidden_mnt2;
+	mntget(meta_mnt);
+
         /* open META-file for writing */
         meta_file = dentry_open(meta_dentry, meta_mnt, 0x1);
         if(!meta_file || IS_ERR(meta_file)) {
@@ -671,14 +681,16 @@
 		}
 	}
 
+	/* $%& err, is this correct? */
+	meta_mnt = stopd(dentry->d_inode->i_sb)->hidden_mnt2;
+	mntget(meta_mnt);
+
         /* open META-file for writing */
         meta_file = dentry_open(meta_dentry, meta_mnt, 0x1);
         if(!meta_file || IS_ERR(meta_file)) {
                 printk(KERN_CRIT "mini_fo: meta_sync_d_list: \
                                   ERROR opening meta file.\n");
-		/* we don't mntget so we dont't mntput (for now)
-		 * mntput(meta_mnt);
-		 */
+		mntput(meta_mnt);
 		dput(meta_dentry);
 		err = -1;
                 goto out;
@@ -811,14 +823,16 @@
 		}
 	}
 
+	/* $%& err, is this correct? */
+	meta_mnt = stopd(dentry->d_inode->i_sb)->hidden_mnt2;
+	mntget(meta_mnt);
+
         /* open META-file for writing */
         meta_file = dentry_open(meta_dentry, meta_mnt, 0x1);
         if(!meta_file || IS_ERR(meta_file)) {
                 printk(KERN_CRIT "mini_fo: meta_sync_r_list: \
                                   ERROR opening meta file.\n");
-		/* we don't mntget so we dont't mntput (for now)
-		 * mntput(meta_mnt);
-		 */
+		mntput(meta_mnt);
 		dput(meta_dentry);
 		err = -1;
                 goto out;