]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: zero out *implemented in __ceph_caps_issued()
authorSage Weil <sage@newdream.net>
Mon, 19 Jan 2009 20:10:53 +0000 (12:10 -0800)
committerSage Weil <sage@newdream.net>
Mon, 19 Jan 2009 20:10:53 +0000 (12:10 -0800)
Otherwise we can get garbage

src/kernel/caps.c

index 9a8aba403088e15f6f8624d53a4a7624a306fcff..4680e81c104a6522f9aaf9761fd0e0a22c0b5ad1 100644 (file)
@@ -283,6 +283,8 @@ int __ceph_caps_issued(struct ceph_inode_info *ci, int *implemented)
        unsigned long ttl;
        struct rb_node *p;
 
+       if (implemented)
+               *implemented = 0;
        for (p = rb_first(&ci->i_caps); p; p = rb_next(p)) {
                cap = rb_entry(p, struct ceph_cap, ci_node);