public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* lock_kernel twice possible ?
@ 2005-10-15  7:04 li nux
  2005-10-15  7:33 ` Coywolf Qi Hunt
  0 siblings, 1 reply; 7+ messages in thread
From: li nux @ 2005-10-15  7:04 UTC (permalink / raw)
  To: linux

Hi,

I was going thru the NFS v3 code for SMP kernel 2.6.11
to see how an inode gets revalidated. I found that
there is a possibility that there may be an attempt to
do lock_kernel() twice.

Is this possible ? If yes then how this deadlock
condition is/can be avoided.

-lnxluv

Below is the code flow (please see ** for
lock_kernel):

nfs_revalidate_inode
 - __nfs_revalidate_inode
   - ** lock_kernel() **
   - nfs_wait_on_inode
   - Call getattr() (which is nfs3_proc_getattr()) to
     get the attributes from the server and 
     refresh the inode with the new values
   - IF the cached data is invalid for the inode
     - Writeback (If dirty) and sync the 
       inode, call nfs_wb_all
     - nfs_wb_all
       - nfs_sync_inode 
           - call nfs_wait_on_requests to wait for
             the requests associated with the pages
             to get complete
           - nfs_flush_inode
             - nfs_scan_dirty
             - nfs_flush_list
               - nfs_flush_one
                 - nfs_write_rpcsetup
                   - nfs3_proc_write_setup
                     - rpc_init_task
                     - rpc_call_setup
           - nfs_execute_write
             - ** lock_kernel() **
             - rpc_execute
             - ** unlock_kernel() **
   - ** unlock_kernel() **     




		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-10-20  7:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-15  7:04 lock_kernel twice possible ? li nux
2005-10-15  7:33 ` Coywolf Qi Hunt
2005-10-15  7:38   ` li nux
2005-10-15  7:47     ` Coywolf Qi Hunt
2005-10-19 21:29       ` Bill Davidsen
2005-10-20  7:00         ` Steven Rostedt
2005-10-15  7:58     ` Mitchell Blank Jr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox