Torsten Lttgert:
> > Your stack trace showed that your problem is in aufs rmdir(2) while
> > Jorgen's is in nfsd.
> 
> Ok, so I got my very own bug :-)
> Good luck finding it!

You might be very lucky enough to buy lotto or something. :-)
While I was reviewing around the BUG line in your log, I noticed one
race condition. I am not sure this is your case, but will you try this
patch?


Junjiro Okajima

----------------------------------------------------------------------
Index: fs/aufs/whout.c
===================================================================
RCS file: /cvsroot/aufs/aufs/fs/aufs/whout.c,v
retrieving revision 1.21
diff -u -p -r1.21 whout.c
--- fs/aufs/whout.c     12 Aug 2007 21:53:13 -0000      1.21
+++ fs/aufs/whout.c     21 Sep 2007 06:02:27 -0000
@@ -292,7 +292,8 @@ static int unlink_wh_name(struct dentry 
        //if (LktrCond) {dput(hidden_dentry); hidden_dentry = ERR_PTR(-1);}
        if (!IS_ERR(hidden_dentry)) {
                err = 0;
-               if (hidden_dentry->d_inode)
+               if (hidden_dentry->d_inode
+                   && S_ISREG(hidden_dentry->d_inode->i_mode))
                        err = do_unlink_wh(hidden_dir, hidden_dentry,
                                           lkup->dlgt);
                dput(hidden_dentry);
@@ -862,6 +863,11 @@ int rmdir_whtmp(struct dentry *hidden_de
        hidden_inode = hidden_dentry->d_inode;
        AuDebugOn(hidden_inode != au_h_iptr_i(inode, bindex));
        hdir2_lock(hidden_inode, inode, bindex);
+
+       /*
+        * someone else might change some whiteouts while we were sleeping.
+        * it means this whlist may have an obsoleted entry.
+        */
        if (!au_test_perm(hidden_inode, MAY_EXEC | MAY_WRITE, lkup.dlgt))
                err = del_wh_children(whlist, hidden_dentry, bindex, &lkup);
        else {

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Reply via email to