Please try to include <linux/*.h> before <asm/*.h> headers.
> +static void d_callback(void *arg)
> +{
> + struct dentry * dentry = (struct dentry *)arg;
> +
> + if (dname_external(dentry))
> + kfree((void *) dentry->d_name.name);
> + kmem_cache_free(dentry_cache, dentry);
> +}
why do you cast to void * before calling kfree?
> - /* dput on a free dentry? */
> - if (!list_empty(&dentry->d_lru))
> - BUG();
> + spin_lock(&dentry->d_lock);
> + if (atomic_read(&dentry->d_count)) {
> + spin_unlock(&dentry->d_lock);
> + spin_unlock(&dcache_lock);
> + return;
> + }
> +
Please use tabs instead of eight spaces in kernel code.
Another implementation details is whether we shouldn't spin on a bit of
->d_vfs_flags instead of increasing struct dentry further. Maybe the
spin_lock_bit interface that wli prototypes might be a godd choise.
Else the patch looks fine to me, although I'm wondering why you target 2.4.17
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/