Messages in this thread | | | Date | Tue, 19 Feb 2002 11:47:59 -0500 (EST) | From | Alexander Viro <> | Subject | Re: BKL removal from VFS |
| |
On 19 Feb 2002, Steve Lord wrote:
> Whoa, light blue touch paper and stand back! Like I said I was not proposing > this to go into the kernel, just asking your opinion.
You asked - I answered ;-)
BTW, check your use of ->d_parent - a lot of places implicitly assumes that it can't change under you. Currently for a filesystem with ->rename() it's true only if at least one of the following conditions is satisfied: * you know that lock on parent is held (e.g. you are in ->lookup() and its ilk and dentry is one you've got from caller). Notice that down(&dentry->d_parent->d_inode->i_sem) is 100% wrong for any such fs. * dcache_lock is held. * BKL is held. * you are called from cross-directory ->rename() (then no dentry on that filesystem will changes its parent until you are done).
Surprisingly many places implicitly rely on BKL (i.e. have no other protection and don't fsck up only because they are always called under BKL). Hell, some places don't have _any_ protection - see 2.4.18-rc2 for fixes to such crap in dnotify-related code.
- 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/
| |