]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Sep 2014 17:31:41 +0000 (10:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Sep 2014 17:31:41 +0000 (10:31 -0700)
added patches:
dcache.c-get-rid-of-pointless-macros.patch

queue-3.10/dcache.c-get-rid-of-pointless-macros.patch [new file with mode: 0644]
queue-3.10/series
queue-3.10/vfs-fix-bad-hashing-of-dentries.patch

diff --git a/queue-3.10/dcache.c-get-rid-of-pointless-macros.patch b/queue-3.10/dcache.c-get-rid-of-pointless-macros.patch
new file mode 100644 (file)
index 0000000..7fe224e
--- /dev/null
@@ -0,0 +1,42 @@
+From 482db9066199813d6b999b65a3171afdbec040b6 Mon Sep 17 00:00:00 2001
+From: Al Viro <viro@zeniv.linux.org.uk>
+Date: Fri, 25 Oct 2013 16:41:01 -0400
+Subject: dcache.c: get rid of pointless macros
+
+From: Al Viro <viro@zeniv.linux.org.uk>
+
+commit 482db9066199813d6b999b65a3171afdbec040b6 upstream.
+
+D_HASH{MASK,BITS} are used once each, both in the same function (d_hash()).
+At this point they are actively misguiding - they imply that values are
+compiler constants, which is no longer true.
+
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/dcache.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/fs/dcache.c
++++ b/fs/dcache.c
+@@ -96,8 +96,6 @@ static struct kmem_cache *dentry_cache _
+  * This hash-function tries to avoid losing too many bits of hash
+  * information, yet avoid using a prime hash-size or similar.
+  */
+-#define D_HASHBITS     d_hash_shift
+-#define D_HASHMASK     d_hash_mask
+ static unsigned int d_hash_mask __read_mostly;
+ static unsigned int d_hash_shift __read_mostly;
+@@ -108,8 +106,8 @@ static inline struct hlist_bl_head *d_ha
+                                       unsigned int hash)
+ {
+       hash += (unsigned long) parent / L1_CACHE_BYTES;
+-      hash = hash + (hash >> D_HASHBITS);
+-      return dentry_hashtable + (hash & D_HASHMASK);
++      hash = hash + (hash >> d_hash_shift);
++      return dentry_hashtable + (hash & d_hash_mask);
+ }
+ /* Statistics gathering. */
index bf0db4b73af66c70acde40a243ee64b88f7de794..2912e3865b7d8edeb3de4240a5b8cdac44fd5991 100644 (file)
@@ -66,4 +66,5 @@ mtd-ftl-fix-the-double-free-of-the-buffers-allocated-in-build_maps.patch
 mtd-nand-omap-fix-1-bit-hamming-code-scheme-omap_calculate_ecc.patch
 blkcg-don-t-call-into-policy-draining-if-root_blkg-is-already-gone.patch
 ib-srp-fix-deadlock-between-host-removal-and-multipathd.patch
+dcache.c-get-rid-of-pointless-macros.patch
 vfs-fix-bad-hashing-of-dentries.patch
index a6364f3dc29093da829d0b5e00bfaa6f9bb16d0f..1647a88db89270ba545158ada095e402cfecb3bf 100644 (file)
@@ -76,13 +76,13 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- a/fs/dcache.c
 +++ b/fs/dcache.c
-@@ -108,8 +108,7 @@ static inline struct hlist_bl_head *d_ha
+@@ -106,8 +106,7 @@ static inline struct hlist_bl_head *d_ha
                                        unsigned int hash)
  {
        hash += (unsigned long) parent / L1_CACHE_BYTES;
--      hash = hash + (hash >> D_HASHBITS);
--      return dentry_hashtable + (hash & D_HASHMASK);
-+      return dentry_hashtable + hash_32(hash, D_HASHBITS);
+-      hash = hash + (hash >> d_hash_shift);
+-      return dentry_hashtable + (hash & d_hash_mask);
++      return dentry_hashtable + hash_32(hash, d_hash_shift);
  }
  
  /* Statistics gathering. */