1 Index: linux-2.6.16.46-0.14/Documentation/filesystems/ext2.txt
2 ===================================================================
3 --- linux-2.6.16.46-0.14.orig/Documentation/filesystems/ext2.txt
4 +++ linux-2.6.16.46-0.14/Documentation/filesystems/ext2.txt
5 @@ -58,6 +58,22 @@ nobh Do not attach buffer_heads to fi
7 xip Use execute in place (no caching) if possible
9 +iopen Makes an invisible pseudo-directory called
10 + __iopen__ available in the root directory
11 + of the filesystem. Allows open-by-inode-
12 + number. i.e., inode 3145 can be accessed
13 + via /mntpt/__iopen__/3145
15 +iopen_nopriv This option makes the iopen directory be
16 + world-readable. This may be safer since it
17 + allows daemons to run as an unprivileged user,
18 + however it significantly changes the security
19 + model of a Unix filesystem, since previously
20 + all files under a mode 700 directory were not
21 + generally avilable even if the
22 + permissions on the file itself is
25 grpquota,noquota,quota,usrquota Quota options are silently ignored by ext2.
28 Index: linux-2.6.16.46-0.14/fs/dcache.c
29 ===================================================================
30 --- linux-2.6.16.46-0.14.orig/fs/dcache.c
31 +++ linux-2.6.16.46-0.14/fs/dcache.c
32 @@ -1309,17 +1309,26 @@ static void __d_rehash(struct dentry * e
33 * Adds a dentry to the hash according to its name.
36 -void d_rehash(struct dentry * entry)
37 +void d_rehash_cond(struct dentry * entry, int lock)
39 struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
41 - spin_lock(&dcache_lock);
43 + spin_lock(&dcache_lock);
44 spin_lock(&entry->d_lock);
45 __d_rehash(entry, list);
46 spin_unlock(&entry->d_lock);
47 - spin_unlock(&dcache_lock);
49 + spin_unlock(&dcache_lock);
52 +EXPORT_SYMBOL(d_rehash_cond);
54 +void d_rehash(struct dentry * entry)
56 + d_rehash_cond(entry, 1);
59 #define do_switch(x,y) do { \
60 __typeof__ (x) __tmp = x; \
61 x = y; y = __tmp; } while (0)
62 @@ -1392,14 +1401,13 @@ static void switch_names(struct dentry *
63 * dcache entries should not be moved in this way.
66 -void d_move(struct dentry * dentry, struct dentry * target)
67 +void d_move_locked(struct dentry * dentry, struct dentry * target)
69 struct hlist_head *list;
72 printk(KERN_WARNING "VFS: moving negative dcache entry\n");
74 - spin_lock(&dcache_lock);
75 write_seqlock(&rename_lock);
77 * XXXX: do we really need to take target->d_lock?
78 @@ -1450,6 +1458,14 @@ already_unhashed:
79 fsnotify_d_move(dentry);
80 spin_unlock(&dentry->d_lock);
81 write_sequnlock(&rename_lock);
84 +EXPORT_SYMBOL(d_move_locked);
86 +void d_move(struct dentry *dentry, struct dentry *target)
88 + spin_lock(&dcache_lock);
89 + d_move_locked(dentry, target);
90 spin_unlock(&dcache_lock);
93 Index: linux-2.6.16.46-0.14/include/linux/dcache.h
94 ===================================================================
95 --- linux-2.6.16.46-0.14.orig/include/linux/dcache.h
96 +++ linux-2.6.16.46-0.14/include/linux/dcache.h
97 @@ -236,6 +236,7 @@ extern int have_submounts(struct dentry
98 * This adds the entry to the hash queues.
100 extern void d_rehash(struct dentry *);
101 +extern void d_rehash_cond(struct dentry *, int lock);
104 * d_add - add dentry to hash queues
105 @@ -271,6 +272,7 @@ static inline struct dentry *d_add_uniqu
107 /* used for rename() and baskets */
108 extern void d_move(struct dentry *, struct dentry *);
109 +extern void d_move_locked(struct dentry *, struct dentry *);
111 /* appendix may either be NULL or be used for transname suffixes */
112 extern struct dentry * d_lookup(struct dentry *, struct qstr *);