[PATCH] dcache fix for 2.4.0-test3-pre6

From: Christopher Cradock (cradockc@oup.co.uk)
Date: Sat Jul 08 2000 - 08:32:56 EDT

  • Next message: Thomas S. Iversen: "Re: Using memory on video card as SWAP."

    Hum, if the old version lets through NULL pointers untouched, then surely you can't test
    for d_count....

    Chris Cradock.

    diff -u include/linux/dcache.h.orig include/linux/dcache.h
    --- include/linux/dcache.h.orig Sat Jul 8 13:09:31 2000
    +++ include/linux/dcache.h Sat Jul 8 13:09:38 2000
    @@ -227,10 +227,11 @@

     static __inline__ struct dentry * dget(struct dentry *dentry)
     {
    - if (!atomic_read(&dentry->d_count))
    - BUG();
    - if (dentry)
    + if (dentry){
    + if (!atomic_read(&dentry->d_count))
    + BUG();
                    atomic_inc(&dentry->d_count);
    + }
            return dentry;
     }

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Jul 08 2000 - 08:35:23 EDT