]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: fix dcache_lock ordering
authorSage Weil <sage@newdream.net>
Thu, 23 Apr 2009 16:49:13 +0000 (09:49 -0700)
committerSage Weil <sage@newdream.net>
Thu, 23 Apr 2009 20:00:31 +0000 (13:00 -0700)
src/kernel/inode.c

index 8fa6a1b4215937fc37e1a879bc5245b3ccfd5113..73608bae4bfe23e9f8d9dbe1b1e5b4d99e68c06d 100644 (file)
@@ -1104,11 +1104,11 @@ retry_lookup:
                        goto retry_lookup;
                } else {
                        /* reorder parent's d_subdirs */
-                       spin_lock(&dn->d_lock);
                        spin_lock(&dcache_lock);
+                       spin_lock(&dn->d_lock);
                        list_move(&dn->d_u.d_child, &parent->d_subdirs);
-                       spin_unlock(&dcache_lock);
                        spin_unlock(&dn->d_lock);
+                       spin_unlock(&dcache_lock);
                }
 
                di = dn->d_fsdata;