From 54be288ec74ca998835e429132755be102c457af Mon Sep 17 00:00:00 2001 From: Paul Keith Date: Mon, 19 Feb 2018 18:04:06 +0100 Subject: [PATCH] sdfat: Fix compilation on Linux 3.4 --- sdfat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdfat.c b/sdfat.c index 49bc22f..060418b 100644 --- a/sdfat.c +++ b/sdfat.c @@ -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);