Whamcloud - gitweb
b=22307 initialize the child_res_id for OPEN lock
authorHongchao.Zhang@Sun.COM <Hongchao.Zhang@Sun.COM>
Fri, 9 Apr 2010 09:35:27 +0000 (17:35 +0800)
committerJohann Lombardi <johann@sun.com>
Fri, 9 Apr 2010 09:40:52 +0000 (11:40 +0200)
in mds_open, initialize the child_res_id before enqueuing
the OPEN lock for the child inode, then to avoid senting
wrong ldlm_res_id to client.

i=johann

lustre/mds/mds_open.c

index 5460b10..31700ac 100644 (file)
@@ -1354,6 +1354,7 @@ found_child:
 
                 /* In case of replay we do not get a lock assuming that the
                    caller has it already */
+                memset(&child_res_id, 0, sizeof(child_res_id));
                 child_res_id.name[0] = dchild->d_inode->i_ino;
                 child_res_id.name[1] = dchild->d_inode->i_generation;