Messages in this thread Patch in this message | | | Date | Sun, 31 Mar 2002 07:04:12 +0200 (CEST) | From | Mike Galbraith <> | Subject | [NFS] Re: vfs_unlink() >=2.5.5-pre1 question |
| |
On Sat, 30 Mar 2002, Alexander Viro wrote:
> a) d_delete() being called too early in vfs_unlink(). Not a big > deal, it's easy to move outside of dget()/dput().
Indeed, that worked just fine. I ran Bill Hawes' fs-test scripts in ext2, ext3 and tmpfs after doing so, and nothing interesting happened.
When I ran them in a knfsd loopback mounted ext2 fs however, a couple of gripes popped out.
nfs_safe_remove: dir1/.nfs00009d5000000b6e busy, d_count=2 nfs_safe_remove: dir2/.nfs00009d5d00000c40 busy, d_count=2
-Mike
For reference:
--- linux-2.5.7/fs/namei.c.org Sat Mar 30 12:54:29 2002 +++ linux-2.5.7/fs/namei.c Sun Mar 31 05:59:24 2002 @@ -1466,16 +1466,15 @@ down(&dentry->d_inode->i_sem); if (d_mountpoint(dentry)) error = -EBUSY; - else { + else error = dir->i_op->unlink(dir, dentry); - if (!error) - d_delete(dentry); - } up(&dentry->d_inode->i_sem); dput(dentry); - if (!error) + if (!error) { + d_delete(dentry); inode_dir_notify(dir, DN_DELETE); + } return error; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |