Whamcloud - gitweb
land b1_5 onto HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / iopen-misc-2.6.18-vanilla.patch
1 Index: linux-2.6/Documentation/filesystems/ext2.txt
2 ===================================================================
3 --- linux-2.6.orig/Documentation/filesystems/ext2.txt   2006-04-03 22:46:38.000000000 +0800
4 +++ linux-2.6/Documentation/filesystems/ext2.txt        2006-07-15 12:54:06.000000000 +0800
5 @@ -58,6 +58,22 @@ nobh                         Do not attach buffer_heads to fi
6  
7  xip                            Use execute in place (no caching) if possible
8  
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
14 +
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
23 +                               world-readable.
24 +
25  grpquota,noquota,quota,usrquota        Quota options are silently ignored by ext2.
26  
27  
28 Index: linux-2.6/fs/dcache.c
29 ===================================================================
30 --- linux-2.6.orig/fs/dcache.c  2006-07-15 12:48:18.000000000 +0800
31 +++ linux-2.6/fs/dcache.c       2006-07-15 12:54:06.000000000 +0800
32 @@ -1341,14 +1341,13 @@ static void switch_names(struct dentry *
33   * dcache entries should not be moved in this way.
34   */
35  
36 -void d_move(struct dentry * dentry, struct dentry * target)
37 +void __d_move(struct dentry * dentry, struct dentry * target)
38  {
39         struct hlist_head *list;
40  
41         if (!dentry->d_inode)
42                 printk(KERN_WARNING "VFS: moving negative dcache entry\n");
43  
44 -       spin_lock(&dcache_lock);
45         write_seqlock(&rename_lock);
46         /*
47          * XXXX: do we really need to take target->d_lock?
48 @@ -1399,6 +1398,14 @@ already_unhashed:
49         fsnotify_d_move(dentry);
50         spin_unlock(&dentry->d_lock);
51         write_sequnlock(&rename_lock);
52 +}
53 +
54 +EXPORT_SYMBOL(__d_move);
55 +
56 +void d_move(struct dentry *dentry, struct dentry *target)
57 +{
58 +       spin_lock(&dcache_lock);
59 +       __d_move(dentry, target);
60         spin_unlock(&dcache_lock);
61  }
62  
63 Index: linux-2.6/include/linux/dcache.h
64 ===================================================================
65 --- linux-2.6.orig/include/linux/dcache.h       2006-07-15 12:48:41.000000000 +0800
66 +++ linux-2.6/include/linux/dcache.h    2006-07-15 12:54:06.000000000 +0800
67 @@ -257,6 +257,7 @@ extern int have_submounts(struct dentry 
68   * This adds the entry to the hash queues.
69   */
70  extern void d_rehash(struct dentry *);
71 +extern void d_rehash_cond(struct dentry *, int lock);
72  
73  /**
74   * d_add - add dentry to hash queues
75 @@ -292,6 +293,7 @@ static inline struct dentry *d_add_uniqu
76  
77  /* used for rename() and baskets */
78  extern void d_move(struct dentry *, struct dentry *);
79 +extern void __d_move(struct dentry *, struct dentry *);
80  
81  /* appendix may either be NULL or be used for transname suffixes */
82  extern struct dentry * d_lookup(struct dentry *, struct qstr *);