fs: sdfat: Fix compilation on Linux 3.4
authorPaul Keith <javelinanddart@gmail.com>
Mon, 19 Feb 2018 17:04:06 +0000 (18:04 +0100)
committerStricted <info@stricted.net>
Thu, 11 Oct 2018 16:03:07 +0000 (18:03 +0200)
Change-Id: I3a500f03f399abc9af9586e80419d75aca5b4320
Signed-off-by: Paul Keith <javelinanddart@gmail.com>
fs/sdfat/sdfat.c

index 49bc22ff7d63473f41d096eae9322de19e1b8804..060418bed7db0834e2190e4aaa50b103ca6b25d1 100644 (file)
@@ -2423,7 +2423,11 @@ static struct dentry *__sdfat_lookup(struct inode *dir, struct dentry *dentry)
                 * In such case, we reuse an alias instead of new dentry
                 */
                if (d_unhashed(alias)) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+                       BUG_ON(alias->d_name.hash != dentry->d_name.hash && alias->d_name.len != dentry->d_name.len);
+#else
                        BUG_ON(alias->d_name.hash_len != dentry->d_name.hash_len);
+#endif
                        sdfat_msg(sb, KERN_INFO, "rehashed a dentry(%p) "
                                "in read lookup", alias);
                        d_drop(dentry);