> > > - check the dir permission by 'ls -ld / /rw /ro /rw/tmp /ro/tmp'
> > yes all ok, all branches has 755 and all tmp has 777
>
> Let me make sure about /tmp.
> Is its permission 0777 or 1777?
If your /rw/tmp is 1777, it may be the trigger of this aufs bug and
please try this patch.
Junjiro Okajima
----------------------------------------------------------------------
--- vfsub.c 2007/06/13 08:35:57 1.21
+++ vfsub.c 2007/06/14 13:32:17
@@ -654,9 +654,6 @@ int vfsub_unlink(struct inode *dir, stru
.dentry = dentry
};
-#ifndef CONFIG_AUFS_DLGT
- call_unlink(&args);
-#else
if (!dlgt)
call_unlink(&args);
else {
@@ -665,7 +662,7 @@ int vfsub_unlink(struct inode *dir, stru
if (unlikely(wkq_err))
err = wkq_err;
}
-#endif
+
return err;
}
--- whout.c 2007/06/14 11:16:41 1.51
+++ whout.c 2007/06/14 13:56:47
@@ -239,6 +239,22 @@ int rename_whtmp(struct dentry *dentry,
/* ---------------------------------------------------------------------- */
+static int do_unlink_wh(struct inode *h_dir, struct dentry *wh_dentry, int
dlgt)
+{
+ LKTRTrace("hi%lu, wh %.*s\n", h_dir->i_ino, DLNPair(wh_dentry));
+ AuDebugOn(!wh_dentry->d_inode
+ || !S_ISREG(wh_dentry->d_inode->i_mode));
+ IMustLock(h_dir);
+
+ /* forces superio when the dir has a sticky bit */
+ if (!dlgt
+ && (h_dir->i_mode & S_ISVTX)
+ && wh_dentry->d_inode->i_uid != current->fsuid)
+ dlgt = 1;
+
+ return vfsub_unlink(h_dir, wh_dentry, dlgt);
+}
+
int au_unlink_wh_dentry(struct inode *hidden_dir, struct dentry *wh_dentry,
struct dentry *dentry, int dlgt)
{
@@ -251,7 +267,7 @@ int au_unlink_wh_dentry(struct inode *hi
|| !S_ISREG(wh_dentry->d_inode->i_mode));
IMustLock(hidden_dir);
- err = vfsub_unlink(hidden_dir, wh_dentry, dlgt);
+ err = do_unlink_wh(hidden_dir, wh_dentry, dlgt);
//if (LktrCond) err = -1; // unavailable
if (!err && dentry)
set_dbwh(dentry, -1);
@@ -277,7 +293,7 @@ static int unlink_wh_name(struct dentry
if (!IS_ERR(hidden_dentry)) {
err = 0;
if (hidden_dentry->d_inode)
- err = vfsub_unlink(hidden_dir, hidden_dentry,
+ err = do_unlink_wh(hidden_dir, hidden_dentry,
lkup->dlgt);
dput(hidden_dentry);
} else
@@ -624,7 +640,7 @@ static struct dentry *do_diropq(struct d
} else {
AuDebugOn(/* !S_ISDIR(dentry->d_inode->i_mode)
* || */!opq_dentry->d_inode);
- err = vfsub_unlink(hidden_dir, opq_dentry, lkup.dlgt);
+ err = do_unlink_wh(hidden_dir, opq_dentry, lkup.dlgt);
//if (LktrCond) err = -1;
if (!err)
set_dbdiropq(dentry, -1);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/