On Mon, Jun 13, 2011 at 09:58:34PM +0200, Emmanuel Dreyfus wrote: > David Laight <da...@l8s.co.uk> wrote: > > > > Solution is to test for vp->v_vflag & VV_ROOT and unlock the vnode > > > before calling vn_open or namei, and relocking it afterwards. > > Is that valid - I assume the root vnode is locked for a reason, > > you can't just unlock it because a routine you need to call wants > > to lock it again. > > Here is the code path: > > sys_extattr_set_file > extattr_set_vp > vn_lock > VOP_SETEXTATTR > ufs_setextattr > ufs_extattr_set > ufs_extattr_autocreate_attr > *** VOP_UNLOCK added here *** > namei ^^^^^^^ whoah. Why?
If it's to find the extended-attribute database -- don't do that. Use a reserved inode like LFS does for the ifile. Thor