Linux 2.4-test3

Magnus Jonsson bigfoot at acc.umu.se
Mon Jul 17 22:55:32 CEST 2000


On 17 July, 2000 - Love sent me these 0.3K bytes:

> Magnus Jonsson <bigfoot at acc.umu.se> writes:
> 
> > In my attempts to get arla running on my Linux box running 2.4-test3
> > I found that 'struct dentry' member 'd_count' has changed from int
> > to atomic_t causing xfs_messages.c and xfs_inodeops.c to fail in
> > compiling.
> 
> If its a atomic_t you should probably use atomic_read().

You are right... I must have been sleeping, coding all night is not
always the right thing to do. ;-)

/Fot - Happy to access afs again...

New patch:

---------------------8<---------------------
bamse:~/arla/xfs/linux> cvs -R diff -u
cvs diff: Diffing .
Index: xfs_inodeops.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/linux/xfs_inodeops.c,v
retrieving revision 1.137
diff -u -r1.137 xfs_inodeops.c
--- xfs_inodeops.c      2000/07/12 16:57:43     1.137
+++ xfs_inodeops.c      2000/07/17 20:36:45
@@ -1799,7 +1799,7 @@
     xfs_print_lock("xfs_d_revalidate after up",
                   &DENTRY_TO_XDENTRY(dentry)->sem);
     if (!DENTRY_TO_XDENTRY(dentry)->valid) {
-       if (dentry->d_count == 1) /* We are the only one */
+       if (atomic_read(&dentry->d_count) == 1) /* We are the only one */
            d_drop(dentry);
        return 0;
     }
Index: xfs_message.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/linux/xfs_message.c,v
retrieving revision 1.83
diff -u -r1.83 xfs_message.c
--- xfs_message.c       2000/06/23 07:55:13     1.83
+++ xfs_message.c       2000/07/17 20:40:14
@@ -362,9 +362,9 @@
                DENTRY_TO_XDENTRY(child)->valid = 0;
            }
            XFSDEB(XDEBMSG, ("clean_all_childs: "
-                            "child->d_count: %d child->d_inode: %p\n",
-                            child->d_count, child->d_inode));
-           if (child->d_count == 0)  /* Throw immediately */
+                            "atomic_read(&child->d_count): %d child->d_inode: %p\n",
+                            atomic_read(&child->d_count), child->d_inode));
+           if (atomic_read(&child->d_count) == 0)  /* Throw immediately */
                d_drop(child);
        }
 #endif
@@ -456,7 +456,7 @@
                          (int)dentry->d_name.len,
                          dentry->d_name.name,
                          dentry,
-                         dentry->d_count));
+                         atomic_read(dentry->d_count)));
        if (dentry->d_count == 0) {
            dget(dentry);
            d_drop(dentry);

---------------------8<---------------------





More information about the Arla-drinkers mailing list