On Fri, Jan 04, 2008 at 01:35:50PM -0700, Matthew Wilcox wrote:
> > > > vfs_setlease()
> > > > if (f_op->setlease())
> > > > res = f_op->setlease()
> > > > if (res)
> > > > return res;
> > > > lock_kernel()
> > > > generic_setlease()
> > > > unlock_kernel()
> >
> > Why can't the filesystem call into generic_setlease() on its own?
>
> Because (assuming we're rid of the BKL), fcntl_setlease() needs to
> acquire the spinlock and hold it while generic_setlease() runs, so
> generic_setlease() can't acquire the lock.
So, the problem is that fcntl_setlease() does
vfs_setlease()
fasync_helper()
which the bkl held over both, and you want to preserve that?
But what that BKL is doing is a mystery to me--the very first thing that
fasync_helper() does is kmem_cache_alloc(., GFP_KERNEL). So you won't
be introducing any new problem if you lock those two operations
separately. Unless I'm totally missing something.
--b.
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html