Thanks, this does fix the bug. ----- Original Message ----- From: "Erez Zadok" <[EMAIL PROTECTED]> To: "Stephen Hemminger" <[EMAIL PROTECTED]> Cc: [EMAIL PROTECTED] Sent: Wednesday, September 10, 2008 8:21:29 PM GMT -08:00 US/Canada Pacific Subject: Re: [Unionfs] crash on rm -rf
In message <[EMAIL PROTECTED]>, Stephen Hemminger writes: > The following sequence of commands causes a kernel panic when > run on 2.6.26.3 + unionfs 2.4. It also crashes on 2.6.25 > > -------------- > > rm -rf /tmp/active /tmp/changes /tmp/config > mkdir /tmp/active > mkdir /tmp/changes > mkdir /tmp/config > > mkdir -p /tmp/active/system/login/user/test1 > mkdir -p /tmp/active/system/login/user/test2/password > echo bar >/tmp/active/system/login/user/test2/password/node.val > > mount -t unionfs -o dirs=/tmp/changes=rw:/tmp/active=ro unionfs /tmp/config > > rm -fr /tmp/config/system/login/user/test2 > _______________________________________________ > unionfs mailing list: http://unionfs.filesystems.org/ > [email protected] > http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs Stephen et al: Thanks for the bug report. I was able to reproduce and fix the bug. This small patch below should take care of it (tested on 2.6.26.3). Cheers, Erez. Unionfs: update parent mnt on unlink Signed-off-by: Erez Zadok <[EMAIL PROTECTED]> diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c index 623f68d..fb236cd 100644 --- a/fs/unionfs/unlink.c +++ b/fs/unionfs/unlink.c @@ -146,6 +146,7 @@ int unionfs_unlink(struct inode *dir, struct dentry *dentry) /* call d_drop so the system "forgets" about us */ if (!err) { unionfs_postcopyup_release(dentry); + unionfs_postcopyup_setmnt(dentry->d_parent); if (inode->i_nlink == 0) /* drop lower inodes */ iput_lowers_all(inode, false); d_drop(dentry); _______________________________________________ unionfs mailing list: http://unionfs.filesystems.org/ [email protected] http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs
