Hello,
I'm just working my way through the fs/open.c:do_sys_truncate() code, and
it looks to me like there will be a problem if there are any locks on the
file when truncate is called.  At the start of this function, lock_kernel()
is called, but near the end it checks for locks on the file with
locks_verify_area(), which calls locks_mandatory_area() if there the file
has mandatory locking, and THAT function also calls lock_kernel().

Am I misunderstanding what lock_kernel() does, or would calling this
function twice from within the same syscall cause the system to lock up
because you are trying to get the same lock twice?

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

Reply via email to