Messages in this thread | | | Date | Thu, 7 Jun 2012 01:40:00 +0100 | From | Al Viro <> | Subject | Re: processes hung after sys_renameat, and 'missing' processes |
| |
On Wed, Jun 06, 2012 at 08:29:14PM -0400, Dave Jones wrote: > void d_move(struct dentry *dentry, struct dentry *target) > { > write_seqlock(&rename_lock); > + > + BUG_ON(!spin_is_locked(&target->d_parent->d_lock)); > + > + if (dentry->d_parent != NULL) > + BUG_ON(!spin_is_locked(&dentry->d_parent->d_lock)); > + > __d_move(dentry, target); > write_sequnlock(&rename_lock); > } > > > To be clear, do you want me to try that with or without the reverts ?
No. Not ->d_lock; ->d_inode->i_mutex. _That_ needs to be held for d_move() to be safe (and on cross-directory move you need ->s_vfs_rename_mutex as well). I'd do it with WARN_ON, BTW, and without the reverts - that way we'll have a clear indication if that code is stepped on.
| |