Whamcloud - gitweb
LU-506 kernel: FC15 - small changes
[fs/lustre-release.git] / lustre / kernel_patches / patches / iopen-misc-2.6.22-vanilla.patch
index 050bd03..1940403 100644 (file)
@@ -1,52 +1,58 @@
-Index: linux-2.6/Documentation/filesystems/ext2.txt
+This patch is needed to allow sharing the kernel with 1.8, and until
+the MGS and llog code has been moved over to using the OSD interface.
+
+Index: linux-2.6.22.5/fs/dcache.c
 ===================================================================
---- linux-2.6.orig/Documentation/filesystems/ext2.txt  2006-04-03 22:46:38.000000000 +0800
-+++ linux-2.6/Documentation/filesystems/ext2.txt       2006-07-15 12:54:06.000000000 +0800
-@@ -58,6 +58,22 @@ nobh                                Do not attach buffer_heads to fi
- xip                           Use execute in place (no caching) if possible
-+iopen                         Makes an invisible pseudo-directory called 
-+                              __iopen__ available in the root directory
-+                              of the filesystem.  Allows open-by-inode-
-+                              number.  i.e., inode 3145 can be accessed
-+                              via /mntpt/__iopen__/3145
+--- linux-2.6.22.5.orig/fs/dcache.c    2008-02-21 00:56:29.000000000 -0700
++++ linux-2.6.22.5/fs/dcache.c 2008-02-21 00:57:02.000000000 -0700
+@@ -1441,13 +1441,22 @@
+  * Adds a dentry to the hash according to its name.
+  */
+  
+-void d_rehash(struct dentry * entry)
++void d_rehash_cond(struct dentry * entry, int lock)
+ {
+-      spin_lock(&dcache_lock);
++      if (lock)
++              spin_lock(&dcache_lock);
+       spin_lock(&entry->d_lock);
+       _d_rehash(entry);
+       spin_unlock(&entry->d_lock);
+-      spin_unlock(&dcache_lock);
++      if (lock)
++              spin_unlock(&dcache_lock);
++}
 +
-+iopen_nopriv                  This option makes the iopen directory be
-+                              world-readable.  This may be safer since it
-+                              allows daemons to run as an unprivileged user,
-+                              however it significantly changes the security
-+                              model of a Unix filesystem, since previously
-+                              all files under a mode 700 directory were not
-+                              generally avilable even if the
-+                              permissions on the file itself is
-+                              world-readable.
++EXPORT_SYMBOL(d_rehash_cond);
 +
- grpquota,noquota,quota,usrquota       Quota options are silently ignored by ext2.
++void d_rehash(struct dentry * entry)
++{
++      d_rehash_cond(entry, 1);
+ }
  
+ #define do_switch(x,y) do { \
+@@ -1537,7 +1546,7 @@
+  * Update the dcache to reflect the move of a file name. Negative
+  * dcache entries should not be moved in this way.
+  */
+-static void d_move_locked(struct dentry * dentry, struct dentry * target)
++void d_move_locked(struct dentry * dentry, struct dentry * target)
+ {
+       struct hlist_head *list;
  
-Index: linux-2.6/fs/dcache.c
-===================================================================
---- linux-2.6.orig/fs/dcache.c 2006-07-15 12:48:18.000000000 +0800
-+++ linux-2.6/fs/dcache.c      2006-07-15 12:54:06.000000000 +0800
-@@ -1608,6 +1608,12 @@
-       spin_unlock(&dcache_lock);
+@@ -1595,6 +1604,7 @@
+       spin_unlock(&dentry->d_lock);
+       write_sequnlock(&rename_lock);
  }
++EXPORT_SYMBOL(d_move_locked);
  
-+void __d_move(struct dentry * dentry, struct dentry * target)
-+{
-+      d_move_locked(dentry, target);
-+}
-+EXPORT_SYMBOL(__d_move);
-+
- /*
-  * Helper that returns 1 if p1 is a parent of p2, else 0
-  */
-Index: linux-2.6/include/linux/dcache.h
+ /**
+  * d_move - move a dentry
+Index: linux-2.6.22.5/include/linux/dcache.h
 ===================================================================
---- linux-2.6.orig/include/linux/dcache.h      2006-07-15 12:48:41.000000000 +0800
-+++ linux-2.6/include/linux/dcache.h   2006-07-15 12:54:06.000000000 +0800
-@@ -257,6 +257,7 @@ extern int have_submounts(struct dentry 
+--- linux-2.6.22.5.orig/include/linux/dcache.h 2008-02-21 00:56:29.000000000 -0700
++++ linux-2.6.22.5/include/linux/dcache.h      2008-02-21 00:57:02.000000000 -0700
+@@ -251,6 +251,7 @@ extern int have_submounts(struct dentry 
   * This adds the entry to the hash queues.
   */
  extern void d_rehash(struct dentry *);
@@ -54,11 +60,11 @@ Index: linux-2.6/include/linux/dcache.h
  
  /**
   * d_add - add dentry to hash queues
-@@ -292,6 +293,7 @@ static inline struct dentry *d_add_uniqu
+@@ -286,6 +287,7 @@ static inline struct dentry *d_add_uniqu
  
  /* used for rename() and baskets */
  extern void d_move(struct dentry *, struct dentry *);
-+extern void __d_move(struct dentry *, struct dentry *);
++extern void d_move_locked(struct dentry *, struct dentry *);
  
  /* appendix may either be NULL or be used for transname suffixes */
  extern struct dentry * d_lookup(struct dentry *, struct qstr *);