UBUNTU: ubuntu: AUFS -- update to 806051bcbeec27748aae2b7957726a4e63ff308e
authorAndy Whitcroft <apw@canonical.com>
Mon, 17 Jan 2011 14:14:49 +0000 (14:14 +0000)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 28 Mar 2011 13:52:57 +0000 (06:52 -0700)
    commit 806051bcbeec27748aae2b7957726a4e63ff308e
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Fri Jan 14 16:05:18 2011 +0900

        aufs: follow the changes in 2.6.38-rcN, testing

        This work is not done yet.
        - review is required for aufs code.
        - there are several known problems in mainline which are being fixed
          now.

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit f996d6b1adcd2c677c818fdf453ba257660f74c0
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Mon Jan 10 17:32:50 2011 +0900

        aufs: bugfix, valid ptr in radix tree instead of dummy 1

        When a process whose pid is larger than 32768 (default),
        si_pid_set_slow() crashes due to a dummy value.
        Replace the value by a valid pointer.

        Reported-by: P.L.H.Bloom@tudelft.nl
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit fb2bbc5fddc96fe90ae86f29dbcb104c224f1831
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Mon Jan 10 13:11:51 2011 +0900

        aufs: tiny, version string for aufs2.1-38-rcN

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 1cbb90f7fc05ea86e872191bc4bc3422d7ef6401
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Mon Jan 10 11:07:29 2011 +0900

        aufs: tiny, version string for aufs2.1-37

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 795be8aa5ea8ac132e4ad4a0e9f1a0e33b9cd692
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Sat Jan 8 02:07:07 2011 +0900

        aufs: tiny, describe installing in aufs2-standalone.git

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 3714bfd727bb7afbfe9a1e8eee8f6aefcc0f4e58
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Fri Jan 7 12:25:06 2011 +0900

        aufs: tiny, new year in copyright

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 6a9bf4a4ebf0c4a5e694de2952d36e576b051692
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Fri Jan 7 12:21:14 2011 +0900

        aufs: tiny, new year in copyright

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 7c771c6f660d9e0f17def9550e396418589e4340
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Fri Jan 7 12:03:19 2011 +0900

        aufs: tiny, describe union-mount and dm-snapshot

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 05a6d7153c58c13bca10ef7eb19ef3e3832d1c40
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Fri Jan 7 10:44:44 2011 +0900

        aufs: bugfix, O_CLOEXEC for the plink maintenance mode

        /sbin/mount.aufs (and others) puts aufs into the plink maintenance mode
        via /proc/fs/aufs/plink_maint which make many other operations to return
        error or block.
        During in this mode, /sbin/mount.aufs exec(2) the original mount(8).
        If mount(8) is not statically linked, it may mmap(2) ld.so (and
        others). And if ld.so is inside of the target aufs, then aufs mmap(2)
        blocks, ie. deadlock.
        To address this problem, specify O_CLOEXEC for /proc/fs/aufs/plink_maint
        which makes aufs to exit the plink maintenance mode, and ->release()
        doesn't care about pid.

        Reported-by: Marco Clocchiatti <ziapannocchia@gmail.com>
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 24b389a51f85350d6fa465d22006cdd0a421ee30
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Mon Jan 3 10:16:17 2011 +0900

        aufs: tiny, describe installing in aufs2-standalone.git

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit 58276fb0ea7dbfa57498fc96f87ecad91606fcd6
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Tue Dec 21 21:25:11 2010 +0900

        aufs: new make target 'install' for stdalone

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

    commit c1cf055abebe4e25d67aeb32208c60ae49da37ac
    Author: J. R. Okajima <hooanon05@yahoo.co.jp>
    Date:   Mon Dec 20 16:00:01 2010 +0900

        aufs: follow the changes in 2.6.37-rcN, aop->freepage

Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>

Signed-off-by: Andy Whitcroft <apw@canonical.com>

67 files changed:
ubuntu/aufs/BOM
ubuntu/aufs/aufs.h
ubuntu/aufs/branch.c
ubuntu/aufs/branch.h
ubuntu/aufs/cpup.c
ubuntu/aufs/cpup.h
ubuntu/aufs/dbgaufs.c
ubuntu/aufs/dbgaufs.h
ubuntu/aufs/dcsub.c
ubuntu/aufs/dcsub.h
ubuntu/aufs/debug.c
ubuntu/aufs/debug.h
ubuntu/aufs/dentry.c
ubuntu/aufs/dentry.h
ubuntu/aufs/dinfo.c
ubuntu/aufs/dir.c
ubuntu/aufs/dir.h
ubuntu/aufs/dynop.c
ubuntu/aufs/dynop.h
ubuntu/aufs/export.c
ubuntu/aufs/f_op.c
ubuntu/aufs/f_op_sp.c
ubuntu/aufs/file.c
ubuntu/aufs/file.h
ubuntu/aufs/finfo.c
ubuntu/aufs/fstype.h
ubuntu/aufs/hfsnotify.c
ubuntu/aufs/hfsplus.c
ubuntu/aufs/hnotify.c
ubuntu/aufs/i_op.c
ubuntu/aufs/i_op_add.c
ubuntu/aufs/i_op_del.c
ubuntu/aufs/i_op_ren.c
ubuntu/aufs/iinfo.c
ubuntu/aufs/inode.c
ubuntu/aufs/inode.h
ubuntu/aufs/ioctl.c
ubuntu/aufs/loop.c
ubuntu/aufs/loop.h
ubuntu/aufs/module.c
ubuntu/aufs/module.h
ubuntu/aufs/mtx.h
ubuntu/aufs/opts.c
ubuntu/aufs/opts.h
ubuntu/aufs/plink.c
ubuntu/aufs/poll.c
ubuntu/aufs/procfs.c
ubuntu/aufs/rdu.c
ubuntu/aufs/rwsem.h
ubuntu/aufs/sbinfo.c
ubuntu/aufs/spl.h
ubuntu/aufs/super.c
ubuntu/aufs/super.h
ubuntu/aufs/sysaufs.c
ubuntu/aufs/sysaufs.h
ubuntu/aufs/sysfs.c
ubuntu/aufs/sysrq.c
ubuntu/aufs/vdir.c
ubuntu/aufs/vfsub.c
ubuntu/aufs/vfsub.h
ubuntu/aufs/wbr_policy.c
ubuntu/aufs/whout.c
ubuntu/aufs/whout.h
ubuntu/aufs/wkq.c
ubuntu/aufs/wkq.h
ubuntu/aufs/xino.c
ubuntu/include/linux/aufs_type.h

index bdad0cd..2884962 100644 (file)
@@ -1,2 +1,2 @@
 URL: http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git
-COMMIT: c5021514085a5d96364e096dbd34cadb2251abfd
+COMMIT: 806051bcbeec27748aae2b7957726a4e63ff308e
index 1363f58..dd4d385 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 25c523d..450ee7f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -555,7 +555,7 @@ static int test_dentry_busy(struct dentry *root, aufs_bindex_t bindex,
                ndentry = dpage->ndentry;
                for (j = 0; !err && j < ndentry; j++) {
                        d = dpage->dentries[j];
-                       AuDebugOn(!atomic_read(&d->d_count));
+                       AuDebugOn(!d->d_count);
                        if (!au_digen_test(d, sigen)) {
                                di_read_lock_child(d, AuLock_IR);
                                if (unlikely(au_dbrange_test(d))) {
index a273e60..fdcaca2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 3f667dd..d12c635 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index cd77860..8e0aa59 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 6205871..d372ca7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index ae41480..2eaa3f0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index d9755f7..0fde88b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -99,7 +99,7 @@ static int au_dpages_append(struct au_dcsub_pages *dpages,
        }
 
        /* d_count can be zero */
-       dpage->dentries[dpage->ndentry++] = dget_locked(dentry);
+       dpage->dentries[dpage->ndentry++] = dget_dlock(dentry);
        return 0; /* success */
 
 out:
@@ -109,13 +109,17 @@ out:
 int au_dcsub_pages(struct au_dcsub_pages *dpages, struct dentry *root,
                   au_dpages_test test, void *arg)
 {
-       int err;
-       struct dentry *this_parent = root;
+       int err, locked = 0;
+       unsigned int seq;
+       struct dentry *this_parent;
        struct list_head *next;
        struct super_block *sb = root->d_sb;
 
        err = 0;
-       spin_lock(&dcache_lock);
+       seq = read_seqbegin(&rename_lock);
+again:
+       this_parent = root;
+       spin_lock(&this_parent->d_lock);
 repeat:
        next = this_parent->d_subdirs.next;
 resume:
@@ -132,28 +136,62 @@ resume:
                struct list_head *tmp = next;
                struct dentry *dentry = list_entry(tmp, struct dentry,
                                                   d_u.d_child);
+
                next = tmp->next;
+               spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
                if (!list_empty(&dentry->d_subdirs)) {
+                       spin_unlock(&this_parent->d_lock);
+                       spin_release(&dentry->d_lock.dep_map, 1, _RET_IP_);
                        this_parent = dentry;
+                       spin_acquire(&this_parent->d_lock.dep_map, 0, 1,
+                                    _RET_IP_);
                        goto repeat;
                }
                if (dentry->d_sb == sb
                    && au_di(dentry)
-                   && (!test || test(dentry, arg))) {
+                   && (!test || test(dentry, arg)))
                        err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
-                       if (unlikely(err))
-                               goto out;
-               }
+               spin_unlock(&dentry->d_lock);
+               if (unlikely(err))
+                       goto out;
        }
 
        if (this_parent != root) {
-               next = this_parent->d_u.d_child.next;
-               this_parent = this_parent->d_parent; /* dcache_lock is locked */
+               struct dentry *tmp;
+               struct dentry *child;
+
+               tmp = this_parent->d_parent;
+               rcu_read_lock();
+               spin_unlock(&this_parent->d_lock);
+               child = this_parent;
+               this_parent = tmp;
+               spin_lock(&this_parent->d_lock);
+               /* might go back up the wrong parent if we have had a rename
+                * or deletion */
+               if (this_parent != child->d_parent ||
+                   (!locked && read_seqretry(&rename_lock, seq))) {
+                       spin_unlock(&this_parent->d_lock);
+                       rcu_read_unlock();
+                       goto rename_retry;
+               }
+               rcu_read_unlock();
+               next = child->d_u.d_child.next;
                goto resume;
        }
+
 out:
-       spin_unlock(&dcache_lock);
+       spin_unlock(&this_parent->d_lock);
+       if (!locked) {
+               if (!err && read_seqretry(&rename_lock, seq))
+                       goto rename_retry;
+       } else
+               write_sequnlock(&rename_lock);
        return err;
+
+rename_retry:
+       locked = 1;
+       write_seqlock(&rename_lock);
+       goto again;
 }
 
 int au_dcsub_pages_rev(struct au_dcsub_pages *dpages, struct dentry *dentry,
@@ -162,14 +200,19 @@ int au_dcsub_pages_rev(struct au_dcsub_pages *dpages, struct dentry *dentry,
        int err;
 
        err = 0;
-       spin_lock(&dcache_lock);
+       write_seqlock(&rename_lock);
        if (do_include && (!test || test(dentry, arg))) {
                err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
                if (unlikely(err))
                        goto out;
        }
+
+       /*
+        * vfsmount_lock is unnecessary since this is a traverse in a single
+        * mount
+        */
        while (!IS_ROOT(dentry)) {
-               dentry = dentry->d_parent; /* dcache_lock is locked */
+               dentry = dentry->d_parent; /* rename_lock is locked */
                if (!test || test(dentry, arg)) {
                        err = au_dpages_append(dpages, dentry, GFP_ATOMIC);
                        if (unlikely(err))
@@ -178,8 +221,7 @@ int au_dcsub_pages_rev(struct au_dcsub_pages *dpages, struct dentry *dentry,
        }
 
 out:
-       spin_unlock(&dcache_lock);
-
+       write_sequnlock(&rename_lock);
        return err;
 }
 
index 13b4fb2..acab939 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index fd3ebd8..7fea72a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -142,11 +142,12 @@ static int do_pri_dentry(aufs_bindex_t bindex, struct dentry *dentry)
                return -1;
        }
        /* do not call dget_parent() here */
+       /* note: access d_xxx without d_lock */
        dpri("d%d: %.*s?/%.*s, %s, cnt %d, flags 0x%x\n",
             bindex,
             AuDLNPair(dentry->d_parent), AuDLNPair(dentry),
             dentry->d_sb ? au_sbtype(dentry->d_sb) : "??",
-            atomic_read(&dentry->d_count), dentry->d_flags);
+            dentry->d_count, dentry->d_flags);
        if (bindex >= 0 && dentry->d_inode && au_test_aufs(dentry->d_sb)) {
                struct au_iinfo *iinfo = au_ii(dentry->d_inode);
                if (iinfo)
index cfe4413..1881844 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 8daf4a3..84d530e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -827,11 +827,9 @@ int au_do_h_d_reval(struct dentry *h_dentry, struct nameidata *nd,
        int (*reval)(struct dentry *, struct nameidata *);
 
        err = 0;
-       reval = NULL;
-       if (h_dentry->d_op)
-               reval = h_dentry->d_op->d_revalidate;
-       if (!reval)
+       if (!(h_dentry->d_flags & DCACHE_OP_REVALIDATE))
                goto out;
+       reval = h_dentry->d_op->d_revalidate;
 
        AuDbg("b%d\n", bindex);
        if (au_test_fs_null_nd(h_dentry->d_sb))
@@ -914,6 +912,7 @@ static int h_d_revalidate(struct dentry *dentry, struct inode *inode,
                        continue;
 
                AuDbg("b%d, %.*s\n", bindex, AuDLNPair(h_dentry));
+               /* spin_lock(&h_dentry->d_lock); */
                h_name = &h_dentry->d_name;
                if (unlikely(do_udba
                             && !is_root
@@ -924,8 +923,10 @@ static int h_d_revalidate(struct dentry *dentry, struct inode *inode,
                        AuDbg("unhash 0x%x 0x%x, %.*s %.*s\n",
                                  unhashed, d_unhashed(h_dentry),
                                  AuDLNPair(dentry), AuDLNPair(h_dentry));
+                       /* spin_unlock(&h_dentry->d_lock); */
                        goto err;
                }
+               /* spin_unlock(&h_dentry->d_lock); */
 
                err = au_do_h_d_reval(h_dentry, nd, dentry, bindex);
                if (unlikely(err))
@@ -1044,6 +1045,10 @@ static int aufs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
        struct super_block *sb;
        struct inode *inode;
 
+       /* todo: support rcu-walk? */
+       if (nd && (nd->flags & LOOKUP_RCU))
+               return -ECHILD;
+
        valid = 0;
        if (unlikely(!au_di(dentry)))
                goto out;
index 4865f5e..8fd0eba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index fff8cdd..9454542 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -128,7 +128,7 @@ int au_di_init(struct dentry *dentry)
        if (dinfo) {
                atomic_set(&dinfo->di_generation, au_sigen(sb));
                /* smp_mb(); */ /* atomic_set */
-               dentry->d_op = &aufs_dop;
+               d_set_d_op(dentry, &aufs_dop);
                dentry->d_fsdata = dinfo;
        } else
                err = -ENOMEM;
@@ -319,7 +319,7 @@ struct dentry *au_h_dptr(struct dentry *dentry, aufs_bindex_t bindex)
                return NULL;
        AuDebugOn(bindex < 0);
        d = au_di(dentry)->di_hdentry[0 + bindex].hd_dentry;
-       AuDebugOn(d && (atomic_read(&d->d_count) <= 0));
+       AuDebugOn(d && d->d_count <= 0);
        return d;
 }
 
index f2d9750..e88d4f2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index d070868..2d0d8d2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 123262c..23b2691 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Junjiro R. Okajima
+ * Copyright (C) 2010-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -187,6 +187,7 @@ static void dy_aop(struct au_dykey *key, const void *h_op,
        DySetAop(bmap);
        DySetAop(invalidatepage);
        DySetAop(releasepage);
+       DySetAop(freepage);
        /* these two will be changed according to an aufs mount option */
        DySetAop(direct_IO);
        DySetAop(get_xip_mem);
index 7d6d777..d848aff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Junjiro R. Okajima
+ * Copyright (C) 2010-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index b638ba6..3a6ba18 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -85,6 +85,7 @@ enum {
 
 static int au_test_anon(struct dentry *dentry)
 {
+       /* note: read d_flags without d_lock */
        return !!(dentry->d_flags & DCACHE_DISCONNECTED);
 }
 
@@ -227,14 +228,18 @@ static struct dentry *decode_by_ino(struct super_block *sb, ino_t ino,
        if (!dir_ino || S_ISDIR(inode->i_mode))
                dentry = d_find_alias(inode);
        else {
-               spin_lock(&dcache_lock);
-               list_for_each_entry(d, &inode->i_dentry, d_alias)
+               spin_lock(&inode->i_lock);
+               list_for_each_entry(d, &inode->i_dentry, d_alias) {
+                       spin_lock(&d->d_lock);
                        if (!au_test_anon(d)
                            && d->d_parent->d_inode->i_ino == dir_ino) {
-                               dentry = dget_locked(d);
+                               dentry = dget_dlock(d);
+                               spin_unlock(&d->d_lock);
                                break;
                        }
-               spin_unlock(&dcache_lock);
+                       spin_unlock(&d->d_lock);
+               }
+               spin_unlock(&inode->i_lock);
        }
        if (unlikely(dentry && au_digen_test(dentry, sigen))) {
                dput(dentry);
index ff0f44b..aa8e3a8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index b9c3679..4f5cde8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 2ba0c00..4b6c4b2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index e0d52ef..5ee45a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 0ffb553..b8fa4d8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 270f2a4..3bdbd14 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index eaed1f1..deb0ab4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 3bb997c..678b69c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Junjiro R. Okajima
+ * Copyright (C) 2010-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 68279f9..5eb51fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -209,17 +209,21 @@ static int hn_gen_by_inode(char *name, unsigned int nlen, struct inode *inode,
        if (!isdir) {
                AuDebugOn(!name);
                au_iigen_dec(inode);
-               spin_lock(&dcache_lock);
+               spin_lock(&inode->i_lock);
                list_for_each_entry(d, &inode->i_dentry, d_alias) {
+                       spin_lock(&d->d_lock);
                        dname = &d->d_name;
                        if (dname->len != nlen
-                           && memcmp(dname->name, name, nlen))
+                           && memcmp(dname->name, name, nlen)) {
+                               spin_unlock(&d->d_lock);
                                continue;
+                       }
                        err = 0;
                        au_digen_dec(d);
+                       spin_unlock(&d->d_lock);
                        break;
                }
-               spin_unlock(&dcache_lock);
+               spin_unlock(&inode->i_lock);
        } else {
                au_fset_si(au_sbi(inode->i_sb), FAILED_REFRESH_DIR);
                d = d_find_alias(inode);
@@ -228,9 +232,14 @@ static int hn_gen_by_inode(char *name, unsigned int nlen, struct inode *inode,
                        goto out;
                }
 
+               spin_lock(&d->d_lock);
                dname = &d->d_name;
-               if (dname->len == nlen && !memcmp(dname->name, name, nlen))
+               if (dname->len == nlen && !memcmp(dname->name, name, nlen)) {
+                       spin_unlock(&d->d_lock);
                        err = hn_gen_tree(d);
+                       spin_lock(&d->d_lock);
+               }
+               spin_unlock(&d->d_lock);
                dput(d);
        }
 
@@ -366,23 +375,27 @@ static struct dentry *lookup_wlock_by_name(char *name, unsigned int nlen,
                return NULL;
 
        dentry = NULL;
-       spin_lock(&dcache_lock);
+       spin_lock(&parent->d_lock);
        list_for_each_entry(d, &parent->d_subdirs, d_u.d_child) {
                /* AuDbg("%.*s\n", AuDLNPair(d)); */
+               spin_lock_nested(&d->d_lock, DENTRY_D_LOCK_NESTED);
                dname = &d->d_name;
                if (dname->len != nlen || memcmp(dname->name, name, nlen))
-                       continue;
+                       goto cont_unlock;
                if (au_di(d))
                        au_digen_dec(d);
                else
-                       continue;
-               if (!atomic_read(&d->d_count))
-                       continue;
+                       goto cont_unlock;
+               if (d->d_count) {
+                       dentry = dget_dlock(d);
+                       spin_unlock(&d->d_lock);
+                       break;
+               }
 
-               dentry = dget(d);
-               break;
+       cont_unlock:
+               spin_unlock(&d->d_lock);
        }
-       spin_unlock(&dcache_lock);
+       spin_unlock(&parent->d_lock);
        dput(parent);
 
        if (dentry)
index dddcaca..aba296e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
 #include <linux/uaccess.h>
 #include "aufs.h"
 
-static int h_permission(struct inode *h_inode, int mask,
+static int h_permission(struct inode *h_inode, int mask, unsigned int flags,
                        struct vfsmount *h_mnt, int brperm)
 {
        int err;
@@ -52,11 +52,11 @@ static int h_permission(struct inode *h_inode, int mask,
                && write_mask && !(mask & MAY_READ))
            || !h_inode->i_op->permission) {
                /* AuLabel(generic_permission); */
-               err = generic_permission(h_inode, mask,
+               err = generic_permission(h_inode, mask, flags,
                                         h_inode->i_op->check_acl);
        } else {
                /* AuLabel(h_inode->permission); */
-               err = h_inode->i_op->permission(h_inode, mask);
+               err = h_inode->i_op->permission(h_inode, mask, flags);
                AuTraceErr(err);
        }
 
@@ -82,7 +82,7 @@ out:
        return err;
 }
 
-static int aufs_permission(struct inode *inode, int mask)
+static int aufs_permission(struct inode *inode, int mask, unsigned int flags)
 {
        int err;
        aufs_bindex_t bindex, bend;
@@ -92,6 +92,10 @@ static int aufs_permission(struct inode *inode, int mask)
        struct super_block *sb;
        struct au_branch *br;
 
+       /* todo: support rcu-walk? */
+       if (flags & IPERM_FLAG_RCU)
+               return -ECHILD;
+
        sb = inode->i_sb;
        si_read_lock(sb, AuLock_FLUSH);
        ii_read_lock_child(inode);
@@ -112,7 +116,8 @@ static int aufs_permission(struct inode *inode, int mask)
                err = 0;
                bindex = au_ibstart(inode);
                br = au_sbr(sb, bindex);
-               err = h_permission(h_inode, mask, br->br_mnt, br->br_perm);
+               err = h_permission(h_inode, mask, flags, br->br_mnt,
+                                  br->br_perm);
                if (write_mask
                    && !err
                    && !special_file(h_inode->i_mode)) {
@@ -138,7 +143,7 @@ static int aufs_permission(struct inode *inode, int mask)
                                break;
 
                        br = au_sbr(sb, bindex);
-                       err = h_permission(h_inode, mask, br->br_mnt,
+                       err = h_permission(h_inode, mask, flags, br->br_mnt,
                                           br->br_perm);
                }
        }
index cd11360..070f631 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 1019bf9..a46720b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index e1d2392..f7dd419 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 571b21d..cd1086e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -259,5 +259,6 @@ void au_iinfo_fin(struct inode *inode)
                }
        }
        kfree(iinfo->ii_hinode);
+       iinfo->ii_hinode = NULL;
        AuRwDestroy(&iinfo->ii_rwsem);
 }
index 9fe4d50..00ae887 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 9f004a0..58144e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 8e1fc79..bb87a22 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 96d50e3..1fbe0c4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index c7ebb79..3b6fc6f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 4f6967e..1d81c64 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 5acab85..3e1655f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 1b7e6f0..31f1abc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Junjiro R. Okajima
+ * Copyright (C) 2010-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index b41f5a1..7f4ba0c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index e788621..a351be5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index d3995bc..b1888f3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -89,15 +89,10 @@ out:
 
 void au_plink_maint_leave(struct au_sbinfo *sbinfo)
 {
-       int iam;
-
        spin_lock(&sbinfo->si_plink_maint_lock);
-       iam = (sbinfo->si_plink_maint_pid == current->pid);
-       if (iam)
-               sbinfo->si_plink_maint_pid = 0;
+       sbinfo->si_plink_maint_pid = 0;
        spin_unlock(&sbinfo->si_plink_maint_lock);
-       if (iam)
-               wake_up_all(&sbinfo->si_plink_wq);
+       wake_up_all(&sbinfo->si_plink_wq);
 }
 
 int au_plink_maint_enter(struct super_block *sb)
index cc19e61..873f3bb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 7810a6e..65d2538 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Junjiro R. Okajima
+ * Copyright (C) 2010-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 6272328..4a5182f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index c3575ee..dcd1def 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 42783dc..d9141f8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -309,7 +309,7 @@ int si_pid_test_slow(struct super_block *sb)
        p = radix_tree_lookup(&au_sbi(sb)->au_si_pid.tree, current->pid);
        rcu_read_unlock();
 
-       return (long)p;
+       return (long)!!p;
 }
 
 void si_pid_set_slow(struct super_block *sb)
@@ -324,7 +324,7 @@ void si_pid_set_slow(struct super_block *sb)
        AuDebugOn(err);
        spin_lock(&sbinfo->au_si_pid.tree_lock);
        err = radix_tree_insert(&sbinfo->au_si_pid.tree, current->pid,
-                               (void *)1);
+                               /*any valid ptr*/sb);
        spin_unlock(&sbinfo->au_si_pid.tree_lock);
        AuDebugOn(err);
        radix_tree_preload_end();
@@ -341,5 +341,4 @@ void si_pid_clr_slow(struct super_block *sb)
        spin_lock(&sbinfo->au_si_pid.tree_lock);
        p = radix_tree_delete(&sbinfo->au_si_pid.tree, current->pid);
        spin_unlock(&sbinfo->au_si_pid.tree_lock);
-       AuDebugOn(1 != (long)p);
 }
index f334034..37a0329 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 008702d..3776125 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -46,10 +46,18 @@ static struct inode *aufs_alloc_inode(struct super_block *sb __maybe_unused)
        return NULL;
 }
 
+static void aufs_destroy_inode_cb(struct rcu_head *head)
+{
+       struct inode *inode = container_of(head, struct inode, i_rcu);
+
+       INIT_LIST_HEAD(&inode->i_dentry);
+       au_cache_free_icntnr(container_of(inode, struct au_icntnr, vfs_inode));
+}
+
 static void aufs_destroy_inode(struct inode *inode)
 {
        au_iinfo_fin(inode);
-       au_cache_free_icntnr(container_of(inode, struct au_icntnr, vfs_inode));
+       call_rcu(&inode->i_rcu, aufs_destroy_inode_cb);
 }
 
 struct inode *au_iget_locked(struct super_block *sb, ino_t ino)
@@ -899,8 +907,6 @@ static void aufs_kill_sb(struct super_block *sb)
                        au_plink_put(sb, /*verbose*/1);
                au_xino_clr(sb);
                aufs_write_unlock(sb->s_root);
-
-               au_plink_maint_leave(sbinfo);
                au_nwt_flush(&sbinfo->si_nowait);
        }
        generic_shutdown_super(sb);
index 1930ce7..33dd69c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 529b59b..ab4036e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 36eb291..5b6b8d0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index cb0310d..f675fb3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 452fe3a..12f6b23 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -60,6 +60,7 @@ static void sysrq_sb(struct super_block *sb)
                err = au_dpages_init(&dpages, GFP_ATOMIC);
                if (unlikely(err))
                        break;
+               /* no way, it requires si write lock */
                err = au_dcsub_pages(&dpages, sb->s_root, NULL, NULL);
                if (!err)
                        for (i = 0; i < dpages.ndpage; i++) {
index 5777ca4..5e42376 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 846a124..76a6c79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -729,8 +729,7 @@ static void call_unlink(void *args)
        struct unlink_args *a = args;
        struct dentry *d = a->path->dentry;
        struct inode *h_inode;
-       const int stop_sillyrename = (au_test_nfs(d->d_sb)
-                                     && atomic_read(&d->d_count) == 1);
+       const int stop_sillyrename = au_test_nfs(d->d_sb);
 
        IMustLock(a->dir);
 
index 9a9f266..7615bf0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 9e4f1e4..dec340a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index bdc989b..7ccf17d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -121,7 +121,7 @@ struct dentry *au_whtmp_lkup(struct dentry *h_parent, struct au_branch *br,
 {
        struct dentry *dentry;
        int i;
-       char defname[NAME_MAX - AUFS_MAX_NAMELEN + DNAME_INLINE_LEN_MIN + 1],
+       char defname[NAME_MAX - AUFS_MAX_NAMELEN + DNAME_INLINE_LEN + 1],
                *name, *p;
        /* strict atomic_t is unnecessary here */
        static unsigned short cnt;
@@ -130,8 +130,8 @@ struct dentry *au_whtmp_lkup(struct dentry *h_parent, struct au_branch *br,
        BUILD_BUG_ON(sizeof(cnt) * 2 > AUFS_WH_TMP_LEN);
 
        name = defname;
-       qs.len = sizeof(defname) - DNAME_INLINE_LEN_MIN + prefix->len - 1;
-       if (unlikely(prefix->len > DNAME_INLINE_LEN_MIN)) {
+       qs.len = sizeof(defname) - DNAME_INLINE_LEN + prefix->len - 1;
+       if (unlikely(prefix->len > DNAME_INLINE_LEN)) {
                dentry = ERR_PTR(-ENAMETOOLONG);
                if (unlikely(qs.len > NAME_MAX))
                        goto out;
index b262ffd..11137f4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index c2a31f9..2ee408a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index b216f03..804f5a0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 7c21a4a..7c8bb43 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 6a67e67..6b9d194 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2010 Junjiro R. Okajima
+ * Copyright (C) 2005-2011 Junjiro R. Okajima
  *
  * This program, aufs is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
 #include <linux/limits.h>
 #include <linux/types.h>
 
-#define AUFS_VERSION   "2.1-standalone.tree-37-rcN-20101220"
+#define AUFS_VERSION   "2.1-standalone.tree-38-rcN-20110117"
 
 /* todo? move this to linux-2.6.19/include/magic.h */
 #define AUFS_SUPER_MAGIC       ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')